6. What's continuous
integration ?
• Is not just tools, Is also a concept
• Goal
• build a better software
• improve your development
7. Concept
• Martin Fowler in 01 May 06
• “software development practice”
• The term 'Continuous Integration' originated
with the Extreme Programming development
process
8. Who’s Martin Fowler ?
• http://martinfowler.com/
• ThoughtWorks
• Books
• Agile development
9. Which “software development
practice” we know ?
• Agile software development
• Scrum
• Extreme Programming
• Feature Driven Development
• ...
• Waterfall model
10. Requirements
• > 1 contributor on the project
• “contributor” : developer, tester, QA
responsible, ...
• > 1 man/day of work
13. What’s integration
means here?
• merging my work with the work of others
• Source code
• Database
• Resources
• ....
14. Classic method
1. I took a task
2. I checkout or update my code with the
corresponding branch
3. I develop
4. I test if it works
5. I commit
15. Continuous Integration
method
1. Classic Method
2. Regularly, a server start a build
a. checkout or update the corresponding
branch
b. test if it works
c. stamp if the build fail or success
16. Ok, but where is the
difference
• First : it test the “integration” of your code with
the code of others success
• Second : it oblige you to write test executable
by a machine (repeatable)
• Second bis : if you do acceptance test. It oblige
you to write an application installable by a
machine
17. Cool, but what’s the
benefit ?
• never gets so far away from that base that it
takes very long to integrate back with it.
• Link to scrum methodology
• Less time is spent trying to find bugs
19. So, yes you convinced me
where I should start ?
20. Tools
• Unit Test : SimpleTest, PHPUnit
• Acceptance Test : Selenium
• Software Metrics : PHPmd, pdepend, phpcpd
• Coding Standard : PHP_CodeSniffer
21. Prepare your repository
• be able to launch the build in one command
line call
• write a script
• Shell Script, Ant, PHP, Phing, Maven for PHP
• include resources needed in your repository or
available trough your script
• Test It!!!
22. Which server of “continuous
integration” we have ?
• A lot but most of them are written in Java
• Some are better integrate with PHP context
23. Which server of “continuous
integration” we have in PHP ?
• CruiseControl (phpUnderControl)
• Xinc
• Hudson
• Bamboo
24. CruiseControl
• Java
• ThoughtWorks
• Open source
• Mother of all CI servers
30. Hudson
• Java • Difference between
build failure and
• More user friendly rules failures
• Extendable • Not only dedicated
to PHP
• Active development
• Open Source • Sun Continuous
Integration Server
35. Which one is the best ?
• The one that fit your need
• Test different tools
• Give feedback
36. Good rules
• Everyone Commits To the Mainline Every Day
• Every Commit Should Build the Mainline on an
Integration Machine
• Keep your build as fast as possible
37. Remarks
• Don’t expect that your build will success or
don’t communicate about that from the start
• all those cliches about Rome's build schedule
apply.
• choose specific point to test or objectives to
reach