SlideShare une entreprise Scribd logo
1  sur  56
Télécharger pour lire hors ligne
Continuous Integration
       for PHP

       www.mollie.nl
Contents
• About Mollie
• What is CI
• What’s in it for you?
• How to set it up
• Tips
• Q&A
• Payment Service Provider
 • iDEAL, Pay-per-call, Premium SMS, etc.
• SMS gateway
 • HTTP API, SMPP, Email to SMS, etc.
• Located in Amsterdam, near Vondelpark
• Four developers
Codebase 1/2

• Main project: 250K LOC
• New code is pretty good, but...
• lots of code created around 2004
  (when magic_quotes was cool)
Codebase 2/2

• Git as SCM
• Also:
 • Plugins for OpenCart, Magento, WHCMS
 • Example API classes
 • Internal projects
Technology

• Nothing too complicated:
 • Nginx
 • PHP
 • MySQL
 • Redis
Continuous Integration
Theory
     In software engineering, continuous integration (CI)
implements continuous processes of applying quality control
   — small pieces of effort, applied frequently. Continuous
 integration aims to improve the quality of software, and to
     reduce the time taken to deliver it, by replacing the
     traditional practice of applying quality control after
       completing all development. (source:Wikipedia)
In practice
Run all tests and create some reports after every
                     commit.
Why is it useful? 1/2

• All tests are run after every commit.
 • You always know if you can deploy after a
    commit.
 • You know who broke a test.
Why is it useful? 2/2

• You can get pretty graphs
• Provides trends
 • Motivational for developers
• First step to deploying from SCM
• No more “works for me”.
Meet Jenkins
What’s in it for you?
PHPUnit
Code coverage 1/4
Code Coverage 2/4
Code Coverage 3/4
Requires xdebug, but it’s pretty cool.
Code coverage 4/4

• Takes some time to generate
• By default: only files included in test are
  part of the coverage.
• Coverage < Assertions
Plots
 phploc
Checkstyle
Copy paste detector
PHP Depend
PHP depend, php mess
    detector etc
• Do fancy analysis on your code
• Create pretty diagrams
• Take a lot of time
• Little value (YMMV)
How to set it up
Vagrant
• Create and configure
  lightweight,
  reproducible, and
  portable development
  environments.
• Works with
  VirtualBox and Chef
Vagrant

• Allows you create VMs and deploy them
  with software from a Chef recipe.
• Many open source Chef recipes available.
• https://github.com/fnichol/chef-jenkins
Vagrantfile
  config.vm.customize do |vm|
    vm.memory_size = 1536
  end
  config.vm.provision :chef_solo do |chef|
    chef.cookbooks_path = "cookbooks"
    chef.json = {
      :jenkins => {
        :server => {
          :plugins => %w(checkstyle clover dry
htmlpublisher jdepend plot pmd violations xunit
git github)
        }
      }
    }
    chef.add_recipe("vagrant_main")
  end
Chef recipe
%w{pdepend/PHP_Depend-beta phpmd/
PHP_PMD-alpha phpunit/phpcpd phpunit/
phploc phpunit/test_helpers
PHPDocumentor PHP_CodeSniffer
digitalsandwich/Phake phpunit/
PHP_CodeBrowser phpunit/PHPUnit}.each
do |pear_package|
  php_pear pear_package do
    options "--alldeps"
     action :install
  end
end
Install PHP specific stuff


• Jenkins PHP manual and templates provided
  by Sebastian Bergmann.
 • http://jenkins-php.org/
Tell Jenkins what to do

• Create build.xml
• Lives in your code
• Create a Job in Jenkins
• Point to your SCM
Configure Jenkins
• After running build.xml, lots of XML files
  are generated.
• You can install plugins in Jenkins which
  understand these XML files
• Configure Jenkins plugins to read these files
  and “publish” them.
• Optionally: do some stuff after build
  succeeds.
Some CI tips
Get fast hardware
Don’t run more than
      you need

• Consider if you want to wait every build on
  phpmd, pdepend etc.
• Alternatively: clone your job and run tests
  only in one job and analysis in other job.
Use SCM tags

• Jenkins can push tags to your SCM if a build
  succeeds
• Combined with tags on deploy very
  convenient
Make sure production
& Jenkins are identical

• Different platforms? --> Bugs.
• Different PHP versions? --> Bugs.
• Different MySQL versions? --> Bugs.
Integrate with your
    dashboards
Integrate with chat
Q &A
willem@mollie.nl
We’re hiring

Contenu connexe

Tendances

dotnetsheff: Continuous delivery with Team City and Octopus Deploy
dotnetsheff: Continuous delivery with Team City and Octopus Deploydotnetsheff: Continuous delivery with Team City and Octopus Deploy
dotnetsheff: Continuous delivery with Team City and Octopus DeployKevin Kuszyk
 
Continuous Delivery with Jenkins declarative pipeline XPDays-2018-12-08
Continuous Delivery with Jenkins declarative pipeline XPDays-2018-12-08Continuous Delivery with Jenkins declarative pipeline XPDays-2018-12-08
Continuous Delivery with Jenkins declarative pipeline XPDays-2018-12-08Борис Зора
 
.Net OSS Ci & CD with Jenkins - JUC ISRAEL 2013
.Net OSS Ci & CD with Jenkins - JUC ISRAEL 2013 .Net OSS Ci & CD with Jenkins - JUC ISRAEL 2013
.Net OSS Ci & CD with Jenkins - JUC ISRAEL 2013 Tikal Knowledge
 
Magento Continuous Integration & Continuous Delivery @MM17HR
Magento Continuous Integration & Continuous Delivery @MM17HRMagento Continuous Integration & Continuous Delivery @MM17HR
Magento Continuous Integration & Continuous Delivery @MM17HRDenis Ristic
 
Continuous delivery - tools and techniques
Continuous delivery - tools and techniquesContinuous delivery - tools and techniques
Continuous delivery - tools and techniquesMike McGarr
 
Developing PHP Applications Faster
Developing PHP Applications FasterDeveloping PHP Applications Faster
Developing PHP Applications FasterAdam Culp
 
Michigan IT Symposium 2017 - CI/CD Workflow Tutorial
Michigan IT Symposium 2017 - CI/CD Workflow TutorialMichigan IT Symposium 2017 - CI/CD Workflow Tutorial
Michigan IT Symposium 2017 - CI/CD Workflow TutorialJeffrey Sica
 
Flash Camp Chennai - Build automation of Flex and AIR applications
Flash Camp Chennai - Build automation of Flex and AIR applicationsFlash Camp Chennai - Build automation of Flex and AIR applications
Flash Camp Chennai - Build automation of Flex and AIR applicationsRIA RUI Society
 
Get acquainted with the new ASP.Net 5
Get acquainted with the new ASP.Net 5Get acquainted with the new ASP.Net 5
Get acquainted with the new ASP.Net 5Suyati Technologies
 
Using Docker for Testing
Using Docker for TestingUsing Docker for Testing
Using Docker for TestingMukta Aphale
 
Improve Development Process with Open Source Software
Improve Development Process with Open Source SoftwareImprove Development Process with Open Source Software
Improve Development Process with Open Source Softwareelliando dias
 
Docker в автоматизации тестирования
Docker в автоматизации тестированияDocker в автоматизации тестирования
Docker в автоматизации тестированияCOMAQA.BY
 
Integration Testing as Validation and Monitoring
 Integration Testing as Validation and Monitoring Integration Testing as Validation and Monitoring
Integration Testing as Validation and MonitoringMelissa Benua
 
Trunk-Based Development and Toggling
Trunk-Based Development and TogglingTrunk-Based Development and Toggling
Trunk-Based Development and TogglingBryan Liu
 

Tendances (20)

dotnetsheff: Continuous delivery with Team City and Octopus Deploy
dotnetsheff: Continuous delivery with Team City and Octopus Deploydotnetsheff: Continuous delivery with Team City and Octopus Deploy
dotnetsheff: Continuous delivery with Team City and Octopus Deploy
 
Continuous Delivery with Jenkins declarative pipeline XPDays-2018-12-08
Continuous Delivery with Jenkins declarative pipeline XPDays-2018-12-08Continuous Delivery with Jenkins declarative pipeline XPDays-2018-12-08
Continuous Delivery with Jenkins declarative pipeline XPDays-2018-12-08
 
.Net OSS Ci & CD with Jenkins - JUC ISRAEL 2013
.Net OSS Ci & CD with Jenkins - JUC ISRAEL 2013 .Net OSS Ci & CD with Jenkins - JUC ISRAEL 2013
.Net OSS Ci & CD with Jenkins - JUC ISRAEL 2013
 
Magento Continuous Integration & Continuous Delivery @MM17HR
Magento Continuous Integration & Continuous Delivery @MM17HRMagento Continuous Integration & Continuous Delivery @MM17HR
Magento Continuous Integration & Continuous Delivery @MM17HR
 
Continuous delivery - tools and techniques
Continuous delivery - tools and techniquesContinuous delivery - tools and techniques
Continuous delivery - tools and techniques
 
Developing PHP Applications Faster
Developing PHP Applications FasterDeveloping PHP Applications Faster
Developing PHP Applications Faster
 
Dev ops using Jenkins
Dev ops using JenkinsDev ops using Jenkins
Dev ops using Jenkins
 
Michigan IT Symposium 2017 - CI/CD Workflow Tutorial
Michigan IT Symposium 2017 - CI/CD Workflow TutorialMichigan IT Symposium 2017 - CI/CD Workflow Tutorial
Michigan IT Symposium 2017 - CI/CD Workflow Tutorial
 
Flash Camp Chennai - Build automation of Flex and AIR applications
Flash Camp Chennai - Build automation of Flex and AIR applicationsFlash Camp Chennai - Build automation of Flex and AIR applications
Flash Camp Chennai - Build automation of Flex and AIR applications
 
Continuous Testing
Continuous TestingContinuous Testing
Continuous Testing
 
Get acquainted with the new ASP.Net 5
Get acquainted with the new ASP.Net 5Get acquainted with the new ASP.Net 5
Get acquainted with the new ASP.Net 5
 
Jenkins Reviewbot
Jenkins ReviewbotJenkins Reviewbot
Jenkins Reviewbot
 
Automated Testing in DevOps
Automated Testing in DevOpsAutomated Testing in DevOps
Automated Testing in DevOps
 
Jenkins
JenkinsJenkins
Jenkins
 
Jenkins-CI
Jenkins-CIJenkins-CI
Jenkins-CI
 
Using Docker for Testing
Using Docker for TestingUsing Docker for Testing
Using Docker for Testing
 
Improve Development Process with Open Source Software
Improve Development Process with Open Source SoftwareImprove Development Process with Open Source Software
Improve Development Process with Open Source Software
 
Docker в автоматизации тестирования
Docker в автоматизации тестированияDocker в автоматизации тестирования
Docker в автоматизации тестирования
 
Integration Testing as Validation and Monitoring
 Integration Testing as Validation and Monitoring Integration Testing as Validation and Monitoring
Integration Testing as Validation and Monitoring
 
Trunk-Based Development and Toggling
Trunk-Based Development and TogglingTrunk-Based Development and Toggling
Trunk-Based Development and Toggling
 

En vedette

Recurring Payments with Mollie Payments for WooCommerce plugin - WooCommerce ...
Recurring Payments with Mollie Payments for WooCommerce plugin - WooCommerce ...Recurring Payments with Mollie Payments for WooCommerce plugin - WooCommerce ...
Recurring Payments with Mollie Payments for WooCommerce plugin - WooCommerce ...Van Ons Web & App development
 
Test Driven Development
Test Driven DevelopmentTest Driven Development
Test Driven Development升煌 黃
 
TDD-based workflow: Optimizing Development Process
TDD-based workflow: Optimizing Development ProcessTDD-based workflow: Optimizing Development Process
TDD-based workflow: Optimizing Development ProcessAkbar Hidayat
 
Responsive Design Workflow
Responsive Design WorkflowResponsive Design Workflow
Responsive Design WorkflowShivanku Kumar
 
Fiddler 網頁除錯工具
Fiddler 網頁除錯工具Fiddler 網頁除錯工具
Fiddler 網頁除錯工具Pu Lee
 
Apk 分析工具整理
Apk 分析工具整理Apk 分析工具整理
Apk 分析工具整理Pu Lee
 
Test driven development with behat and silex
Test driven development with behat and silexTest driven development with behat and silex
Test driven development with behat and silexDionyshs Tsoumas
 
Hello. Continuous Integration
Hello. Continuous IntegrationHello. Continuous Integration
Hello. Continuous IntegrationYuki Matsumura
 
Continuous Delivery for Front-End Engineers
Continuous Delivery for Front-End EngineersContinuous Delivery for Front-End Engineers
Continuous Delivery for Front-End EngineersSergey Bolshchikov
 
React Native in Production
React Native in ProductionReact Native in Production
React Native in ProductionSeokjun Kim
 
Unit testing with PHPUnit - there's life outside of TDD
Unit testing with PHPUnit - there's life outside of TDDUnit testing with PHPUnit - there's life outside of TDD
Unit testing with PHPUnit - there's life outside of TDDPaweł Michalik
 
Test your code like a pro - PHPUnit in practice
Test your code like a pro - PHPUnit in practiceTest your code like a pro - PHPUnit in practice
Test your code like a pro - PHPUnit in practiceSebastian Marek
 
DDD系統分析
DDD系統分析DDD系統分析
DDD系統分析國昭 張
 
Test Driven Development with PHPUnit
Test Driven Development with PHPUnitTest Driven Development with PHPUnit
Test Driven Development with PHPUnitTuan Nguyen
 
Azure Container Service 使用 DC / OS 管理 docker 容器
Azure Container Service 使用 DC / OS 管理 docker 容器Azure Container Service 使用 DC / OS 管理 docker 容器
Azure Container Service 使用 DC / OS 管理 docker 容器Ch Rick
 

En vedette (20)

Recurring Payments with Mollie Payments for WooCommerce plugin - WooCommerce ...
Recurring Payments with Mollie Payments for WooCommerce plugin - WooCommerce ...Recurring Payments with Mollie Payments for WooCommerce plugin - WooCommerce ...
Recurring Payments with Mollie Payments for WooCommerce plugin - WooCommerce ...
 
Juc boston2014.pptx
Juc boston2014.pptxJuc boston2014.pptx
Juc boston2014.pptx
 
OAuth2介紹
OAuth2介紹OAuth2介紹
OAuth2介紹
 
Test Driven Development
Test Driven DevelopmentTest Driven Development
Test Driven Development
 
TDD-based workflow: Optimizing Development Process
TDD-based workflow: Optimizing Development ProcessTDD-based workflow: Optimizing Development Process
TDD-based workflow: Optimizing Development Process
 
Responsive Design Workflow
Responsive Design WorkflowResponsive Design Workflow
Responsive Design Workflow
 
Fiddler 網頁除錯工具
Fiddler 網頁除錯工具Fiddler 網頁除錯工具
Fiddler 網頁除錯工具
 
Apk 分析工具整理
Apk 分析工具整理Apk 分析工具整理
Apk 分析工具整理
 
Test driven development with behat and silex
Test driven development with behat and silexTest driven development with behat and silex
Test driven development with behat and silex
 
Hello. Continuous Integration
Hello. Continuous IntegrationHello. Continuous Integration
Hello. Continuous Integration
 
Continuous Delivery for Front-End Engineers
Continuous Delivery for Front-End EngineersContinuous Delivery for Front-End Engineers
Continuous Delivery for Front-End Engineers
 
DDD引導
DDD引導DDD引導
DDD引導
 
React Native in Production
React Native in ProductionReact Native in Production
React Native in Production
 
Unit testing with PHPUnit - there's life outside of TDD
Unit testing with PHPUnit - there's life outside of TDDUnit testing with PHPUnit - there's life outside of TDD
Unit testing with PHPUnit - there's life outside of TDD
 
Test your code like a pro - PHPUnit in practice
Test your code like a pro - PHPUnit in practiceTest your code like a pro - PHPUnit in practice
Test your code like a pro - PHPUnit in practice
 
DDD系統分析
DDD系統分析DDD系統分析
DDD系統分析
 
SEO Tendencies for 2017
SEO Tendencies for 2017SEO Tendencies for 2017
SEO Tendencies for 2017
 
Test Driven Development with PHPUnit
Test Driven Development with PHPUnitTest Driven Development with PHPUnit
Test Driven Development with PHPUnit
 
Property-based testing
Property-based testingProperty-based testing
Property-based testing
 
Azure Container Service 使用 DC / OS 管理 docker 容器
Azure Container Service 使用 DC / OS 管理 docker 容器Azure Container Service 使用 DC / OS 管理 docker 容器
Azure Container Service 使用 DC / OS 管理 docker 容器
 

Similaire à Continuous Integration at Mollie

Quality code in wordpress
Quality code in wordpressQuality code in wordpress
Quality code in wordpressRan Bar-Zik
 
Symfony under control. Continuous Integration and Automated Deployments in Sy...
Symfony under control. Continuous Integration and Automated Deployments in Sy...Symfony under control. Continuous Integration and Automated Deployments in Sy...
Symfony under control. Continuous Integration and Automated Deployments in Sy...Max Romanovsky
 
Symfony Under Control by Maxim Romanovsky
Symfony Under Control by Maxim RomanovskySymfony Under Control by Maxim Romanovsky
Symfony Under Control by Maxim Romanovskyphp-user-group-minsk
 
Continuous Integration In A PHP World
Continuous Integration In A PHP WorldContinuous Integration In A PHP World
Continuous Integration In A PHP WorldIdaf_1er
 
Fluo CICD OpenStack Summit
Fluo CICD OpenStack SummitFluo CICD OpenStack Summit
Fluo CICD OpenStack SummitMiguel Zuniga
 
Jenkins_1679702972.pdf
Jenkins_1679702972.pdfJenkins_1679702972.pdf
Jenkins_1679702972.pdfMahmoudAlnmr1
 
August Webinar - Water Cooler Talks: A Look into a Developer's Workbench
August Webinar - Water Cooler Talks: A Look into a Developer's WorkbenchAugust Webinar - Water Cooler Talks: A Look into a Developer's Workbench
August Webinar - Water Cooler Talks: A Look into a Developer's WorkbenchHoward Greenberg
 
Magento 2 Workflows
Magento 2 WorkflowsMagento 2 Workflows
Magento 2 WorkflowsRyan Street
 
Modern Web-site Development Pipeline
Modern Web-site Development PipelineModern Web-site Development Pipeline
Modern Web-site Development PipelineGlobalLogic Ukraine
 
Introduction to jenkins
Introduction to jenkinsIntroduction to jenkins
Introduction to jenkinsAbe Diaz
 
Hudson
HudsonHudson
Hudson8x8
 
Symfony2 for legacy app rejuvenation: the eZ Publish case study
Symfony2 for legacy app rejuvenation: the eZ Publish case studySymfony2 for legacy app rejuvenation: the eZ Publish case study
Symfony2 for legacy app rejuvenation: the eZ Publish case studyGaetano Giunta
 
How bigtop leveraged docker for build automation and one click hadoop provis...
How bigtop leveraged docker for build automation and  one click hadoop provis...How bigtop leveraged docker for build automation and  one click hadoop provis...
How bigtop leveraged docker for build automation and one click hadoop provis...Evans Ye
 
Continuous Integration for OpenVMS with Jenkins
Continuous Integration for OpenVMS with JenkinsContinuous Integration for OpenVMS with Jenkins
Continuous Integration for OpenVMS with Jenkinsecubemarketing
 
Comment améliorer le quotidien des Développeurs PHP ?
Comment améliorer le quotidien des Développeurs PHP ?Comment améliorer le quotidien des Développeurs PHP ?
Comment améliorer le quotidien des Développeurs PHP ?AFUP_Limoges
 
Chef onlinuxonpower
Chef onlinuxonpowerChef onlinuxonpower
Chef onlinuxonpowerMoya Brannan
 
Continuous Integration with Open Source Tools - PHPUgFfm 2014-11-20
Continuous Integration with Open Source Tools - PHPUgFfm 2014-11-20Continuous Integration with Open Source Tools - PHPUgFfm 2014-11-20
Continuous Integration with Open Source Tools - PHPUgFfm 2014-11-20Michael Lihs
 
How bigtop leveraged docker for build automation and one click hadoop provis...
How bigtop leveraged docker for build automation and  one click hadoop provis...How bigtop leveraged docker for build automation and  one click hadoop provis...
How bigtop leveraged docker for build automation and one click hadoop provis...Evans Ye
 

Similaire à Continuous Integration at Mollie (20)

Quality code in wordpress
Quality code in wordpressQuality code in wordpress
Quality code in wordpress
 
Symfony under control. Continuous Integration and Automated Deployments in Sy...
Symfony under control. Continuous Integration and Automated Deployments in Sy...Symfony under control. Continuous Integration and Automated Deployments in Sy...
Symfony under control. Continuous Integration and Automated Deployments in Sy...
 
Symfony Under Control by Maxim Romanovsky
Symfony Under Control by Maxim RomanovskySymfony Under Control by Maxim Romanovsky
Symfony Under Control by Maxim Romanovsky
 
Continuous Integration In A PHP World
Continuous Integration In A PHP WorldContinuous Integration In A PHP World
Continuous Integration In A PHP World
 
Fluo CICD OpenStack Summit
Fluo CICD OpenStack SummitFluo CICD OpenStack Summit
Fluo CICD OpenStack Summit
 
Jenkins_1679702972.pdf
Jenkins_1679702972.pdfJenkins_1679702972.pdf
Jenkins_1679702972.pdf
 
jenkins.pdf
jenkins.pdfjenkins.pdf
jenkins.pdf
 
August Webinar - Water Cooler Talks: A Look into a Developer's Workbench
August Webinar - Water Cooler Talks: A Look into a Developer's WorkbenchAugust Webinar - Water Cooler Talks: A Look into a Developer's Workbench
August Webinar - Water Cooler Talks: A Look into a Developer's Workbench
 
Magento 2 Workflows
Magento 2 WorkflowsMagento 2 Workflows
Magento 2 Workflows
 
Modern Web-site Development Pipeline
Modern Web-site Development PipelineModern Web-site Development Pipeline
Modern Web-site Development Pipeline
 
Introduction to jenkins
Introduction to jenkinsIntroduction to jenkins
Introduction to jenkins
 
Hudson
HudsonHudson
Hudson
 
Symfony2 for legacy app rejuvenation: the eZ Publish case study
Symfony2 for legacy app rejuvenation: the eZ Publish case studySymfony2 for legacy app rejuvenation: the eZ Publish case study
Symfony2 for legacy app rejuvenation: the eZ Publish case study
 
How bigtop leveraged docker for build automation and one click hadoop provis...
How bigtop leveraged docker for build automation and  one click hadoop provis...How bigtop leveraged docker for build automation and  one click hadoop provis...
How bigtop leveraged docker for build automation and one click hadoop provis...
 
Continuous Integration for OpenVMS with Jenkins
Continuous Integration for OpenVMS with JenkinsContinuous Integration for OpenVMS with Jenkins
Continuous Integration for OpenVMS with Jenkins
 
Comment améliorer le quotidien des Développeurs PHP ?
Comment améliorer le quotidien des Développeurs PHP ?Comment améliorer le quotidien des Développeurs PHP ?
Comment améliorer le quotidien des Développeurs PHP ?
 
Chef onlinuxonpower
Chef onlinuxonpowerChef onlinuxonpower
Chef onlinuxonpower
 
DevOps demystified
DevOps demystifiedDevOps demystified
DevOps demystified
 
Continuous Integration with Open Source Tools - PHPUgFfm 2014-11-20
Continuous Integration with Open Source Tools - PHPUgFfm 2014-11-20Continuous Integration with Open Source Tools - PHPUgFfm 2014-11-20
Continuous Integration with Open Source Tools - PHPUgFfm 2014-11-20
 
How bigtop leveraged docker for build automation and one click hadoop provis...
How bigtop leveraged docker for build automation and  one click hadoop provis...How bigtop leveraged docker for build automation and  one click hadoop provis...
How bigtop leveraged docker for build automation and one click hadoop provis...
 

Dernier

Generative AI - Gitex v1Generative AI - Gitex v1.pptx
Generative AI - Gitex v1Generative AI - Gitex v1.pptxGenerative AI - Gitex v1Generative AI - Gitex v1.pptx
Generative AI - Gitex v1Generative AI - Gitex v1.pptxfnnc6jmgwh
 
Generative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdfGenerative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdfIngrid Airi González
 
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesHow to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesThousandEyes
 
UiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to HeroUiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to HeroUiPathCommunity
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsPixlogix Infotech
 
Abdul Kader Baba- Managing Cybersecurity Risks and Compliance Requirements i...
Abdul Kader Baba- Managing Cybersecurity Risks  and Compliance Requirements i...Abdul Kader Baba- Managing Cybersecurity Risks  and Compliance Requirements i...
Abdul Kader Baba- Managing Cybersecurity Risks and Compliance Requirements i...itnewsafrica
 
React Native vs Ionic - The Best Mobile App Framework
React Native vs Ionic - The Best Mobile App FrameworkReact Native vs Ionic - The Best Mobile App Framework
React Native vs Ionic - The Best Mobile App FrameworkPixlogix Infotech
 
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentEmixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentPim van der Noll
 
Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...
Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...
Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...Nikki Chapple
 
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality AssuranceInflectra
 
Varsha Sewlal- Cyber Attacks on Critical Critical Infrastructure
Varsha Sewlal- Cyber Attacks on Critical Critical InfrastructureVarsha Sewlal- Cyber Attacks on Critical Critical Infrastructure
Varsha Sewlal- Cyber Attacks on Critical Critical Infrastructureitnewsafrica
 
Testing tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesTesting tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesKari Kakkonen
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxLoriGlavin3
 
Connecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfConnecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfNeo4j
 
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Alkin Tezuysal
 
Top 10 Hubspot Development Companies in 2024
Top 10 Hubspot Development Companies in 2024Top 10 Hubspot Development Companies in 2024
Top 10 Hubspot Development Companies in 2024TopCSSGallery
 
QCon London: Mastering long-running processes in modern architectures
QCon London: Mastering long-running processes in modern architecturesQCon London: Mastering long-running processes in modern architectures
QCon London: Mastering long-running processes in modern architecturesBernd Ruecker
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxLoriGlavin3
 
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...Wes McKinney
 

Dernier (20)

Generative AI - Gitex v1Generative AI - Gitex v1.pptx
Generative AI - Gitex v1Generative AI - Gitex v1.pptxGenerative AI - Gitex v1Generative AI - Gitex v1.pptx
Generative AI - Gitex v1Generative AI - Gitex v1.pptx
 
Generative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdfGenerative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdf
 
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesHow to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
 
UiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to HeroUiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to Hero
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and Cons
 
Abdul Kader Baba- Managing Cybersecurity Risks and Compliance Requirements i...
Abdul Kader Baba- Managing Cybersecurity Risks  and Compliance Requirements i...Abdul Kader Baba- Managing Cybersecurity Risks  and Compliance Requirements i...
Abdul Kader Baba- Managing Cybersecurity Risks and Compliance Requirements i...
 
React Native vs Ionic - The Best Mobile App Framework
React Native vs Ionic - The Best Mobile App FrameworkReact Native vs Ionic - The Best Mobile App Framework
React Native vs Ionic - The Best Mobile App Framework
 
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentEmixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
 
Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...
Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...
Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...
 
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
 
Varsha Sewlal- Cyber Attacks on Critical Critical Infrastructure
Varsha Sewlal- Cyber Attacks on Critical Critical InfrastructureVarsha Sewlal- Cyber Attacks on Critical Critical Infrastructure
Varsha Sewlal- Cyber Attacks on Critical Critical Infrastructure
 
Testing tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesTesting tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examples
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptx
 
Connecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfConnecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdf
 
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
 
Top 10 Hubspot Development Companies in 2024
Top 10 Hubspot Development Companies in 2024Top 10 Hubspot Development Companies in 2024
Top 10 Hubspot Development Companies in 2024
 
QCon London: Mastering long-running processes in modern architectures
QCon London: Mastering long-running processes in modern architecturesQCon London: Mastering long-running processes in modern architectures
QCon London: Mastering long-running processes in modern architectures
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
 
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
 

Continuous Integration at Mollie

  • 1. Continuous Integration for PHP www.mollie.nl
  • 2. Contents • About Mollie • What is CI • What’s in it for you? • How to set it up • Tips • Q&A
  • 3. • Payment Service Provider • iDEAL, Pay-per-call, Premium SMS, etc. • SMS gateway • HTTP API, SMPP, Email to SMS, etc. • Located in Amsterdam, near Vondelpark • Four developers
  • 4. Codebase 1/2 • Main project: 250K LOC • New code is pretty good, but... • lots of code created around 2004 (when magic_quotes was cool)
  • 5. Codebase 2/2 • Git as SCM • Also: • Plugins for OpenCart, Magento, WHCMS • Example API classes • Internal projects
  • 6. Technology • Nothing too complicated: • Nginx • PHP • MySQL • Redis
  • 8. Theory In software engineering, continuous integration (CI) implements continuous processes of applying quality control — small pieces of effort, applied frequently. Continuous integration aims to improve the quality of software, and to reduce the time taken to deliver it, by replacing the traditional practice of applying quality control after completing all development. (source:Wikipedia)
  • 9. In practice Run all tests and create some reports after every commit.
  • 10. Why is it useful? 1/2 • All tests are run after every commit. • You always know if you can deploy after a commit. • You know who broke a test.
  • 11. Why is it useful? 2/2 • You can get pretty graphs • Provides trends • Motivational for developers • First step to deploying from SCM • No more “works for me”.
  • 13.
  • 14.
  • 15. What’s in it for you?
  • 16.
  • 17.
  • 18.
  • 20.
  • 21.
  • 22.
  • 25. Code Coverage 3/4 Requires xdebug, but it’s pretty cool.
  • 26. Code coverage 4/4 • Takes some time to generate • By default: only files included in test are part of the coverage. • Coverage < Assertions
  • 28.
  • 29.
  • 33. PHP depend, php mess detector etc • Do fancy analysis on your code • Create pretty diagrams • Take a lot of time • Little value (YMMV)
  • 34. How to set it up
  • 35. Vagrant • Create and configure lightweight, reproducible, and portable development environments. • Works with VirtualBox and Chef
  • 36. Vagrant • Allows you create VMs and deploy them with software from a Chef recipe. • Many open source Chef recipes available. • https://github.com/fnichol/chef-jenkins
  • 37. Vagrantfile config.vm.customize do |vm| vm.memory_size = 1536 end config.vm.provision :chef_solo do |chef| chef.cookbooks_path = "cookbooks" chef.json = { :jenkins => { :server => { :plugins => %w(checkstyle clover dry htmlpublisher jdepend plot pmd violations xunit git github) } } } chef.add_recipe("vagrant_main") end
  • 38. Chef recipe %w{pdepend/PHP_Depend-beta phpmd/ PHP_PMD-alpha phpunit/phpcpd phpunit/ phploc phpunit/test_helpers PHPDocumentor PHP_CodeSniffer digitalsandwich/Phake phpunit/ PHP_CodeBrowser phpunit/PHPUnit}.each do |pear_package| php_pear pear_package do options "--alldeps" action :install end end
  • 39. Install PHP specific stuff • Jenkins PHP manual and templates provided by Sebastian Bergmann. • http://jenkins-php.org/
  • 40. Tell Jenkins what to do • Create build.xml • Lives in your code • Create a Job in Jenkins • Point to your SCM
  • 41.
  • 42. Configure Jenkins • After running build.xml, lots of XML files are generated. • You can install plugins in Jenkins which understand these XML files • Configure Jenkins plugins to read these files and “publish” them. • Optionally: do some stuff after build succeeds.
  • 43.
  • 46.
  • 47. Don’t run more than you need • Consider if you want to wait every build on phpmd, pdepend etc. • Alternatively: clone your job and run tests only in one job and analysis in other job.
  • 48. Use SCM tags • Jenkins can push tags to your SCM if a build succeeds • Combined with tags on deploy very convenient
  • 49. Make sure production & Jenkins are identical • Different platforms? --> Bugs. • Different PHP versions? --> Bugs. • Different MySQL versions? --> Bugs.
  • 50. Integrate with your dashboards
  • 51.
  • 52.
  • 53.