https://joind.in/9937 2 CodeConnexx 7 November 2013 Goals for today ● Introduce Continuous Integration for PHP ● Install Jenkins ● Configure Jenkins for PHP ● Configure a project in Jenkins
https://joind.in/9937 5 CodeConnexx 7 November 2013 About me ● I am Mike van Riel ● Lead Developer for phpDocumentor ● Software Composer at Ingewikkeld
https://joind.in/9937 6 CodeConnexx 7 November 2013 About me ● I am Mike van Riel ● Lead Developer for phpDocumentor ● Software Composer at Ingewikkeld ● Foster father of two cute dogs
https://joind.in/9937 12 CodeConnexx 7 November 2013 Continuous Integration ● A watchdog guarding your Quality. ● Immediate insight into the state of your code-base. ● Detailed overview of possible issues. ● A way of thinking and working.
https://joind.in/9937 20 CodeConnexx 7 November 2013 Jenkins ● Java application ● Extensible with a lot of plugins ● Integrates nicely with PHP QA Tools
https://joind.in/9937 22 CodeConnexx 7 November 2013 What for? Mess detection Automated testing Copy/paste detection Various metrics Coding Standards API Documentation
https://joind.in/9937 27 CodeConnexx 7 November 2013 PHPloc & PHP_Depend ● Collects many metrics – Cyclomatic Complexity – N-path Complexity – Lines per method – Spread of classes – And a lot more
https://joind.in/9937 29 CodeConnexx 7 November 2013 PHPDocumentor ● API Reference Documentation ● Class Diagram ● Documentation validation Especially useful for open source projects
https://joind.in/9937 31 CodeConnexx 7 November 2013 Installing Jenkins Manual Installation 1. Install Java 2. Download war file 3. Put on server 4. Add to boot scripts Using a package manager 1. Add Jenkins repository 2. Update package manager 3. Run installation
https://joind.in/9937 41 CodeConnexx 7 November 2013 Jenkins-PHP.org ● Maintained by Sebastian Bergmann ● Job template for PHP projects ● Provides assistance with instructions ● But: replace phpdox with phpDocumentor
https://joind.in/9937 46 CodeConnexx 7 November 2013 Setting up a new project 1. Create a build file 2. Tell Jenkins to add a new Job 3. Use a copy of the existing php-template job 4. Add VCS information and schedule 5. Enable your Job