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

Continuous Integration In A PHP World

on

  • 5,783 views

 

Statistics

Views

Total Views
5,783
Views on SlideShare
5,587
Embed Views
196

Actions

Likes
10
Downloads
113
Comments
0

8 Embeds 196

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 5
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 Continuous Integration In A PHP World Presentation Transcript

  • Continuous integration in a PHP World PHP Barcelona Conference 2009
  • 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 @
  • What's continuous integration ?
  • What's continuous integration ? • Is not just tools, Is also a concept • Goal • build a better software • improve your development
  • Concept • Martin Fowler in 01 May 06 • “software development practice” • The term 'Continuous Integration' originated with the Extreme Programming development process
  • Who’s Martin Fowler ? • http://martinfowler.com/ • ThoughtWorks • Books • Agile development
  • Which “software development practice” we know ? • Agile software development • Scrum • Extreme Programming • Feature Driven Development • ... • Waterfall model
  • Requirements • > 1 contributor on the project • “contributor” : developer, tester, QA responsible, ... • > 1 man/day of work
  • What’s integration means here?
  • What’s integration means here? • merging my work with the work of others • Source code • Database • Resources • ....
  • 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
  • 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
  • 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
  • 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
  • Objectives • Unit tests • End-to-End(Acceptance) tests • Database tests • Quality Assurance • Software metrics • Code duplication • Coding standard
  • So, yes you convinced me where I should start ?
  • Tools • Unit Test : SimpleTest, PHPUnit • Acceptance Test : Selenium • Software Metrics : PHPmd, pdepend, phpcpd • Coding Standard : PHP_CodeSniffer
  • 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!!!
  • Which server of “continuous integration” we have ? • A lot but most of them are written in Java • Some are better integrate with PHP context
  • Which server of “continuous integration” we have in PHP ? • CruiseControl (phpUnderControl) • Xinc • Hudson • Bamboo
  • CruiseControl • Java • ThoughtWorks • Open source • Mother of all CI servers
  • CruiseControl
  • phpUnderControl • Based on CruiseControl • Java and PHP • http://phpundercontrol.org • Opensource • PHP dedicated
  • phpUnderControl
  • Xinc • Xinc is not CruiseControl • PHP • http://code.google.com/p/xinc/ • Open source • PHP dedicated
  • Xinc
  • 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
  • Hudson
  • Bamboo • Atlassian • Commercial • Integration with PHPUnit • Java
  • Bamboo
  • Demo ?
  • Which one is the best ? • The one that fit your need • Test different tools • Give feedback
  • 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
  • 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
  • Conclusion Continuous Integration reduced risk of fail!
  • Question ?
  • Thanks • Ján Lukács for Quitter Icon • Robert S. Donovan for toolbox picture
  • 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