SlideShare uma empresa Scribd logo
1 de 41
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

Mais conteúdo relacionado

Mais procurados

Continuous integration
Continuous integrationContinuous integration
Continuous integration
amscanne
 

Mais procurados (20)

Continuous Integration
Continuous IntegrationContinuous Integration
Continuous Integration
 
Continuous Integration (CI) - An effective development practice
Continuous Integration (CI) - An effective development practiceContinuous Integration (CI) - An effective development practice
Continuous Integration (CI) - An effective development practice
 
Devops | CICD Pipeline
Devops | CICD PipelineDevops | CICD Pipeline
Devops | CICD Pipeline
 
Keeping Your CI/CD Pipeline as Fast as It Needs to Be
Keeping Your CI/CD Pipeline as Fast as It Needs to BeKeeping Your CI/CD Pipeline as Fast as It Needs to Be
Keeping Your CI/CD Pipeline as Fast as It Needs to Be
 
continous integration and delivery
continous integration and deliverycontinous integration and delivery
continous integration and delivery
 
Continuous Integration for Beginners
Continuous Integration for BeginnersContinuous Integration for Beginners
Continuous Integration for Beginners
 
Continuous integration
Continuous integrationContinuous integration
Continuous integration
 
Continuous, continuous, continuous
Continuous, continuous, continuousContinuous, continuous, continuous
Continuous, continuous, continuous
 
Step away from that knife!
Step away from that knife!Step away from that knife!
Step away from that knife!
 
Creating a continuous delivery pipeline with docker
Creating a continuous delivery pipeline with dockerCreating a continuous delivery pipeline with docker
Creating a continuous delivery pipeline with docker
 
Flex on Grails - Rich Internet Applications With Rapid Application Development
Flex on Grails - Rich Internet Applications With Rapid Application DevelopmentFlex on Grails - Rich Internet Applications With Rapid Application Development
Flex on Grails - Rich Internet Applications With Rapid Application Development
 
"How to deploy to production 10 times a day" Андрей Шумада
"How to deploy to production 10 times a day" Андрей Шумада"How to deploy to production 10 times a day" Андрей Шумада
"How to deploy to production 10 times a day" Андрей Шумада
 
Selenium and Cucumber Automation Services
Selenium and Cucumber Automation ServicesSelenium and Cucumber Automation Services
Selenium and Cucumber Automation Services
 
Simple ci cd with strider cd
Simple ci cd with strider cdSimple ci cd with strider cd
Simple ci cd with strider cd
 
Cloud load testing with Visual Studio Team Services
Cloud load testing with Visual Studio Team ServicesCloud load testing with Visual Studio Team Services
Cloud load testing with Visual Studio Team Services
 
Continuous integration & Continuous Delivery @DeVz
Continuous integration & Continuous Delivery @DeVzContinuous integration & Continuous Delivery @DeVz
Continuous integration & Continuous Delivery @DeVz
 
EVOLVE'15 | Enhance | Rene Ugarte | AEM Quality Assurance
EVOLVE'15 | Enhance | Rene Ugarte | AEM Quality AssuranceEVOLVE'15 | Enhance | Rene Ugarte | AEM Quality Assurance
EVOLVE'15 | Enhance | Rene Ugarte | AEM Quality Assurance
 
The state of testing @ Microsoft
The state of testing @ MicrosoftThe state of testing @ Microsoft
The state of testing @ Microsoft
 
Continuous Integration - What even is it?
Continuous Integration - What even is it?Continuous Integration - What even is it?
Continuous Integration - What even is it?
 
CI-CD and DevOps with Ruby
CI-CD and DevOps with RubyCI-CD and DevOps with Ruby
CI-CD and DevOps with Ruby
 

Semelhante a Continuous Integration In A PHP World

Build software like a bag of marbles, not a castle of LEGO®
Build software like a bag of marbles, not a castle of LEGO®Build software like a bag of marbles, not a castle of LEGO®
Build software like a bag of marbles, not a castle of LEGO®
Hannes Lowette
 
Automating Web Application Deployment
Automating Web Application DeploymentAutomating Web Application Deployment
Automating Web Application Deployment
Mathew Byrne
 
Acing application lifecycle management in SharePoint
Acing application lifecycle management in SharePointAcing application lifecycle management in SharePoint
Acing application lifecycle management in SharePoint
Jeremy Thake
 

Semelhante a Continuous Integration In A PHP World (20)

Enterprise PHP
Enterprise PHPEnterprise PHP
Enterprise PHP
 
Continuous Integration at Mollie
Continuous Integration at MollieContinuous Integration at Mollie
Continuous Integration at Mollie
 
Tools for Software Testing
Tools for Software TestingTools for Software Testing
Tools for Software Testing
 
DevOps on AWS: Deep Dive on Continuous Delivery and the AWS Developer Tools
DevOps on AWS: Deep Dive on Continuous Delivery and the AWS Developer ToolsDevOps on AWS: Deep Dive on Continuous Delivery and the AWS Developer Tools
DevOps on AWS: Deep Dive on Continuous Delivery and the AWS Developer Tools
 
KrishnaToolComparisionPPT.pdf
KrishnaToolComparisionPPT.pdfKrishnaToolComparisionPPT.pdf
KrishnaToolComparisionPPT.pdf
 
Application Lifecycle Management
Application Lifecycle ManagementApplication Lifecycle Management
Application Lifecycle Management
 
Overview of Kovair Omnibus Integration Platform
Overview of Kovair Omnibus Integration PlatformOverview of Kovair Omnibus Integration Platform
Overview of Kovair Omnibus Integration Platform
 
Developing PHP Applications Faster
Developing PHP Applications FasterDeveloping PHP Applications Faster
Developing PHP Applications Faster
 
Hudson
HudsonHudson
Hudson
 
Development Processes and Tooling
Development Processes and ToolingDevelopment Processes and Tooling
Development Processes and Tooling
 
Build software like a bag of marbles, not a castle of LEGO®
Build software like a bag of marbles, not a castle of LEGO®Build software like a bag of marbles, not a castle of LEGO®
Build software like a bag of marbles, not a castle of LEGO®
 
Automating Web Application Deployment
Automating Web Application DeploymentAutomating Web Application Deployment
Automating Web Application Deployment
 
DevOps Friendly Doc Publishing for APIs & Microservices
DevOps Friendly Doc Publishing for APIs & MicroservicesDevOps Friendly Doc Publishing for APIs & Microservices
DevOps Friendly Doc Publishing for APIs & Microservices
 
Continuous delivery applied (RJUG)
Continuous delivery applied (RJUG)Continuous delivery applied (RJUG)
Continuous delivery applied (RJUG)
 
Dev ops ci-ap-is-oh-my_security-gone-agile_ut-austin
Dev ops ci-ap-is-oh-my_security-gone-agile_ut-austinDev ops ci-ap-is-oh-my_security-gone-agile_ut-austin
Dev ops ci-ap-is-oh-my_security-gone-agile_ut-austin
 
Lean-Agile Development with SharePoint - Bill Ayers
Lean-Agile Development with SharePoint - Bill AyersLean-Agile Development with SharePoint - Bill Ayers
Lean-Agile Development with SharePoint - Bill Ayers
 
DevOps Overview in my own words
DevOps Overview in my own wordsDevOps Overview in my own words
DevOps Overview in my own words
 
Random thoughts and dev practices / advices to build a great product
Random thoughts and dev practices / advices to build a great productRandom thoughts and dev practices / advices to build a great product
Random thoughts and dev practices / advices to build a great product
 
TYPO3 Camp Stuttgart 2015 - Continuous Delivery with Open Source Tools
TYPO3 Camp Stuttgart 2015 - Continuous Delivery with Open Source ToolsTYPO3 Camp Stuttgart 2015 - Continuous Delivery with Open Source Tools
TYPO3 Camp Stuttgart 2015 - Continuous Delivery with Open Source Tools
 
Acing application lifecycle management in SharePoint
Acing application lifecycle management in SharePointAcing application lifecycle management in SharePoint
Acing application lifecycle management in SharePoint
 

Último

Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
WSO2
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 

Último (20)

Ransomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfRansomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdf
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 

Continuous Integration In A PHP World

  • 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.
  • 5.
  • 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
  • 12.
  • 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
  • 18. Objectives • Unit tests • End-to-End(Acceptance) tests • Database tests • Quality Assurance • Software metrics • Code duplication • Coding standard
  • 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
  • 26. phpUnderControl • Based on CruiseControl • Java and PHP • http://phpundercontrol.org • Opensource • PHP dedicated
  • 28. Xinc • Xinc is not CruiseControl • PHP • http://code.google.com/p/xinc/ • Open source • PHP dedicated
  • 29. Xinc
  • 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
  • 32. Bamboo • Atlassian • Commercial • Integration with PHPUnit • Java
  • 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
  • 40. Thanks • Ján Lukács for Quitter Icon • Robert S. Donovan for toolbox picture
  • 41. 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