Continuous Integration is the combination of any number of the available tools used to improve quality of both code and process. In this session we will look at these available tools and how these can be used. We will also look at Continuous Integration in general and CruiseControl in particular, at how to set it up and built a platform for robust and high-quality code. This session is a must-see for development leaders and technical managers alike, to understand the available options and the advantages offered by this approach.
How to Troubleshoot Apps for the Modern Connected Worker
Improving code quality with continuous integration (PHPBenelux Conference 2011)
1. Improving code quality with
Continuous Integration
Martin de Keijzer
PHPBenelux Conference 2011
2. Martin de Keijzer
•Software Engineer at Ibuildings
•PHPBenelux board member
•Zend Certified Engineer (PHP5)
•Twitter: Martin1982
2
3. Image resources
Slide 5: http://labs.specialmoves.com/code/automating-development-tasks-ant-and-hudson/
Slide 9: http://chucktv.net/
Slide 10: http://www.sxc.hu/photo/1269250
Slide 12: http://www.sxc.hu/photo/1139313
Slide 15: http://www.sxc.hu/photo/913679
Slide 24: http://www.sxc.hu/photo/1269809
Slide 30: http://www.sxc.hu/photo/1290413
Your rights missing?? Contact me and I will update the slide.
3
4. Talk summary
•What is Continuous Integration
•The structure of a CI environment
•Tools for a CI process
•Setting up your CI server
•Apache Ant
•Adding your project
•Questions
4
6. What is continuous integration?
First written of in 1999; originating from
the eXtreme Programming community.
Martin Fowler Kent Beck
6
7. What is continuous integration?
Wikipedia says:
“In software engineering, continuous integration (CI)
implements continuous processes of applying quality
control — small pieces of effort, applied frequently.”
7
11. Benefits of CI
•Detect errors early and
often
•Scaleable automation of
Quality Assurance
9
12. Benefits of CI
•Detect errors early and
often
•Scaleable automation of
Quality Assurance
•Reports for each build
9
13. Benefits of CI
•Detect errors early and
often
•Scaleable automation of
Quality Assurance
•Reports for each build
•Improvement of your
overall codebase
9
14. Benefits of CI
•Detect errors early and
often
•Scaleable automation of
Quality Assurance
•Reports for each build
•Improvement of your
overall codebase
•API Documentation
9
15. Benefits of CI
•Detect errors early and
often
•Scaleable automation of
Quality Assurance
•Reports for each build
•Improvement of your
overall codebase
•API Documentation
•Customer and developer
satisfaction
9
17. The structure
Developer A Commits
SCM
Developer B Git/SVN/etc..
Developer C Revision checks
Continuous Integration Server
Build Tool
Apache Ant
Set of quality assurance tools
PHPDoc / CodeSniffer / PHPMD / PHPUnit / Pdepend
CI Frontend
11
53. Preparing a project
Checklist:
• Is my project under source control?
• Which tools do I want to use for my project?
• Do I know the command line options to get the right output?
• Are the output formats of my tools supported by the CI server?
47
66. Thank you!
Slides will be available at:
http://www.slideshare.com/Martin82
VirtualBox image available per request
during the rest of the conference.