Continuous Integration In A PHP World
Upcoming SlideShare
Loading in...5
×
 

Like this? Share it with your network

Share

Continuous Integration In A PHP World

on

  • 5,929 views

 

Statistics

Views

Total Views
5,929
Views on SlideShare
5,731
Embed Views
198

Actions

Likes
10
Downloads
114
Comments
0

8 Embeds 198

http://www.mostofreddy.com.ar 80
http://jujo00obo2o234ungd3t8qjfcjrs3o6k-a-sites-opensocial.googleusercontent.com 57
http://www.thehouseofblogs.com 22
http://www.slideshare.net 11
http://kartones.net 10
http://twiki.corp.memoriki.com 9
http://www.scoop.it 7
http://www.thob.org 2
More...

Accessibility

Categories

Upload Details

Uploaded via as Apple Keynote

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

Continuous Integration In A PHP World Presentation Transcript

  • 1. Continuous integration in a PHP World PHP Barcelona Conference 2009
  • 2. Davide Mendolia • http://davidemendolia.blogspot.com • dmendolia@php.net or @davideme • lead developer APM (Alternative PHP Monitor) • Contributor on php-benchmark • http://www.php-ci.net • Working @
  • 3. What's continuous integration ?
  • 4. What's continuous integration ? • Is not just tools, Is also a concept • Goal • build a better software • improve your development
  • 5. Concept • Martin Fowler in 01 May 06 • “software development practice” • The term 'Continuous Integration' originated with the Extreme Programming development process
  • 6. Who’s Martin Fowler ? • http://martinfowler.com/ • ThoughtWorks • Books • Agile development
  • 7. Which “software development practice” we know ? • Agile software development • Scrum • Extreme Programming • Feature Driven Development • ... • Waterfall model
  • 8. Requirements • > 1 contributor on the project • “contributor” : developer, tester, QA responsible, ... • > 1 man/day of work
  • 9. What’s integration means here?
  • 10. What’s integration means here? • merging my work with the work of others • Source code • Database • Resources • ....
  • 11. 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
  • 12. 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
  • 13. 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
  • 14. 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
  • 15. Objectives • Unit tests • End-to-End(Acceptance) tests • Database tests • Quality Assurance • Software metrics • Code duplication • Coding standard
  • 16. So, yes you convinced me where I should start ?
  • 17. Tools • Unit Test : SimpleTest, PHPUnit • Acceptance Test : Selenium • Software Metrics : PHPmd, pdepend, phpcpd • Coding Standard : PHP_CodeSniffer
  • 18. 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!!!
  • 19. Which server of “continuous integration” we have ? • A lot but most of them are written in Java • Some are better integrate with PHP context
  • 20. Which server of “continuous integration” we have in PHP ? • CruiseControl (phpUnderControl) • Xinc • Hudson • Bamboo
  • 21. CruiseControl • Java • ThoughtWorks • Open source • Mother of all CI servers
  • 22. CruiseControl
  • 23. phpUnderControl • Based on CruiseControl • Java and PHP • http://phpundercontrol.org • Opensource • PHP dedicated
  • 24. phpUnderControl
  • 25. Xinc • Xinc is not CruiseControl • PHP • http://code.google.com/p/xinc/ • Open source • PHP dedicated
  • 26. Xinc
  • 27. 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
  • 28. Hudson
  • 29. Bamboo • Atlassian • Commercial • Integration with PHPUnit • Java
  • 30. Bamboo
  • 31. Demo ?
  • 32. Which one is the best ? • The one that fit your need • Test different tools • Give feedback
  • 33. 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
  • 34. 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
  • 35. Conclusion Continuous Integration reduced risk of fail!
  • 36. Question ?
  • 37. Thanks • Ján Lukács for Quitter Icon • Robert S. Donovan for toolbox picture
  • 38. References • http://en.wikipedia.org/wiki/ Continuous_integration • http://www.webopedia.com/TERM/E/ Extreme_Programming.html • http://www.jetbrains.com/devnet/academy/ concepts/cont_integration.html