SlideShare a Scribd company logo
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

More Related Content

What's hot

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
Kevin 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 @MM17HR
Denis Ristic
 
Continuous delivery - tools and techniques
Continuous delivery - tools and techniquesContinuous delivery - tools and techniques
Continuous delivery - tools and techniques
Mike McGarr
 
Developing PHP Applications Faster
Developing PHP Applications FasterDeveloping PHP Applications Faster
Developing PHP Applications Faster
Adam Culp
 
Dev ops using Jenkins
Dev ops using JenkinsDev 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
Jeffrey 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 applications
RIA RUI Society
 
Continuous Testing
Continuous TestingContinuous Testing
Continuous Testing
Crevise Technologies
 
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
Suyati Technologies
 
Jenkins Reviewbot
Jenkins ReviewbotJenkins Reviewbot
Jenkins Reviewbot
Yardena Meymann
 
Automated Testing in DevOps
Automated Testing in DevOpsAutomated Testing in DevOps
Automated Testing in DevOps
Haufe-Lexware GmbH & Co KG
 
Jenkins
JenkinsJenkins
Jenkins-CI
Jenkins-CIJenkins-CI
Jenkins-CI
Gong Haibing
 
Using Docker for Testing
Using Docker for TestingUsing Docker for Testing
Using Docker for Testing
Mukta 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 Software
elliando 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 Monitoring
Melissa Benua
 
Trunk-Based Development and Toggling
Trunk-Based Development and TogglingTrunk-Based Development and Toggling
Trunk-Based Development and Toggling
Bryan Liu
 

What's hot (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
 

Viewers also liked

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
 
Juc boston2014.pptx
Juc boston2014.pptxJuc boston2014.pptx
Juc boston2014.pptx
Brandon Mueller
 
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
Akbar Hidayat
 
Responsive Design Workflow
Responsive Design WorkflowResponsive Design Workflow
Responsive Design Workflow
Shivanku 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 silex
Dionyshs Tsoumas
 
Hello. Continuous Integration
Hello. Continuous IntegrationHello. Continuous Integration
Hello. Continuous Integration
Yuki Matsumura
 
Continuous Delivery for Front-End Engineers
Continuous Delivery for Front-End EngineersContinuous Delivery for Front-End Engineers
Continuous Delivery for Front-End Engineers
Sergey Bolshchikov
 
DDD引導
DDD引導DDD引導
DDD引導
國昭 張
 
React Native in Production
React Native in ProductionReact Native in Production
React Native in Production
Seokjun 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 TDD
Paweł 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 practice
Sebastian Marek
 
DDD系統分析
DDD系統分析DDD系統分析
DDD系統分析
國昭 張
 
SEO Tendencies for 2017
SEO Tendencies for 2017SEO Tendencies for 2017
SEO Tendencies for 2017
Borislav Arapchev
 
Test Driven Development with PHPUnit
Test Driven Development with PHPUnitTest Driven Development with PHPUnit
Test Driven Development with PHPUnit
Tuan Nguyen
 
Property-based testing
Property-based testingProperty-based testing
Property-based testing
Dmitriy Morozov
 
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
 

Viewers also liked (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 容器
 

Similar to Continuous Integration at Mollie

Quality code in wordpress
Quality code in wordpressQuality code in wordpress
Quality code in wordpress
Ran Bar-Zik
 
Symfony Under Control by Maxim Romanovsky
Symfony Under Control by Maxim RomanovskySymfony Under Control by Maxim Romanovsky
Symfony Under Control by Maxim Romanovsky
php-user-group-minsk
 
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
 
Continuous Integration In A PHP World
Continuous Integration In A PHP WorldContinuous Integration In A PHP World
Continuous Integration In A PHP World
Idaf_1er
 
Fluo CICD OpenStack Summit
Fluo CICD OpenStack SummitFluo CICD OpenStack Summit
Fluo CICD OpenStack Summit
Miguel Zuniga
 
jenkins.pdf
jenkins.pdfjenkins.pdf
jenkins.pdf
shahidafrith
 
Jenkins_1679702972.pdf
Jenkins_1679702972.pdfJenkins_1679702972.pdf
Jenkins_1679702972.pdf
MahmoudAlnmr1
 
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
Howard Greenberg
 
Magento 2 Workflows
Magento 2 WorkflowsMagento 2 Workflows
Magento 2 Workflows
Ryan Street
 
Modern Web-site Development Pipeline
Modern Web-site Development PipelineModern Web-site Development Pipeline
Modern Web-site Development Pipeline
GlobalLogic Ukraine
 
Introduction to jenkins
Introduction to jenkinsIntroduction to jenkins
Introduction to jenkins
Abe Diaz
 
Hudson
HudsonHudson
Hudson
8x8
 
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
Gaetano 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 Jenkins
ecubemarketing
 
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 onlinuxonpower
Moya Brannan
 
DevOps demystified
DevOps demystifiedDevOps demystified
DevOps demystified
Xebia IT Architects
 
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
Michael 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
 

Similar to Continuous Integration at Mollie (20)

Quality code in wordpress
Quality code in wordpressQuality code in wordpress
Quality code in wordpress
 
Symfony Under Control by Maxim Romanovsky
Symfony Under Control by Maxim RomanovskySymfony Under Control by Maxim Romanovsky
Symfony Under Control by Maxim Romanovsky
 
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...
 
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.pdf
jenkins.pdfjenkins.pdf
jenkins.pdf
 
Jenkins_1679702972.pdf
Jenkins_1679702972.pdfJenkins_1679702972.pdf
Jenkins_1679702972.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...
 

Recently uploaded

Harnessing the Power of NLP and Knowledge Graphs for Opioid Research
Harnessing the Power of NLP and Knowledge Graphs for Opioid ResearchHarnessing the Power of NLP and Knowledge Graphs for Opioid Research
Harnessing the Power of NLP and Knowledge Graphs for Opioid Research
Neo4j
 
Principle of conventional tomography-Bibash Shahi ppt..pptx
Principle of conventional tomography-Bibash Shahi ppt..pptxPrinciple of conventional tomography-Bibash Shahi ppt..pptx
Principle of conventional tomography-Bibash Shahi ppt..pptx
BibashShahi
 
Northern Engraving | Nameplate Manufacturing Process - 2024
Northern Engraving | Nameplate Manufacturing Process - 2024Northern Engraving | Nameplate Manufacturing Process - 2024
Northern Engraving | Nameplate Manufacturing Process - 2024
Northern Engraving
 
Energy Efficient Video Encoding for Cloud and Edge Computing Instances
Energy Efficient Video Encoding for Cloud and Edge Computing InstancesEnergy Efficient Video Encoding for Cloud and Edge Computing Instances
Energy Efficient Video Encoding for Cloud and Edge Computing Instances
Alpen-Adria-Universität
 
Biomedical Knowledge Graphs for Data Scientists and Bioinformaticians
Biomedical Knowledge Graphs for Data Scientists and BioinformaticiansBiomedical Knowledge Graphs for Data Scientists and Bioinformaticians
Biomedical Knowledge Graphs for Data Scientists and Bioinformaticians
Neo4j
 
GraphRAG for LifeSciences Hands-On with the Clinical Knowledge Graph
GraphRAG for LifeSciences Hands-On with the Clinical Knowledge GraphGraphRAG for LifeSciences Hands-On with the Clinical Knowledge Graph
GraphRAG for LifeSciences Hands-On with the Clinical Knowledge Graph
Neo4j
 
Introduction of Cybersecurity with OSS at Code Europe 2024
Introduction of Cybersecurity with OSS  at Code Europe 2024Introduction of Cybersecurity with OSS  at Code Europe 2024
Introduction of Cybersecurity with OSS at Code Europe 2024
Hiroshi SHIBATA
 
Columbus Data & Analytics Wednesdays - June 2024
Columbus Data & Analytics Wednesdays - June 2024Columbus Data & Analytics Wednesdays - June 2024
Columbus Data & Analytics Wednesdays - June 2024
Jason Packer
 
“How Axelera AI Uses Digital Compute-in-memory to Deliver Fast and Energy-eff...
“How Axelera AI Uses Digital Compute-in-memory to Deliver Fast and Energy-eff...“How Axelera AI Uses Digital Compute-in-memory to Deliver Fast and Energy-eff...
“How Axelera AI Uses Digital Compute-in-memory to Deliver Fast and Energy-eff...
Edge AI and Vision Alliance
 
9 CEO's who hit $100m ARR Share Their Top Growth Tactics Nathan Latka, Founde...
9 CEO's who hit $100m ARR Share Their Top Growth Tactics Nathan Latka, Founde...9 CEO's who hit $100m ARR Share Their Top Growth Tactics Nathan Latka, Founde...
9 CEO's who hit $100m ARR Share Their Top Growth Tactics Nathan Latka, Founde...
saastr
 
Driving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success StoryDriving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success Story
Safe Software
 
Taking AI to the Next Level in Manufacturing.pdf
Taking AI to the Next Level in Manufacturing.pdfTaking AI to the Next Level in Manufacturing.pdf
Taking AI to the Next Level in Manufacturing.pdf
ssuserfac0301
 
Fueling AI with Great Data with Airbyte Webinar
Fueling AI with Great Data with Airbyte WebinarFueling AI with Great Data with Airbyte Webinar
Fueling AI with Great Data with Airbyte Webinar
Zilliz
 
Monitoring and Managing Anomaly Detection on OpenShift.pdf
Monitoring and Managing Anomaly Detection on OpenShift.pdfMonitoring and Managing Anomaly Detection on OpenShift.pdf
Monitoring and Managing Anomaly Detection on OpenShift.pdf
Tosin Akinosho
 
Freshworks Rethinks NoSQL for Rapid Scaling & Cost-Efficiency
Freshworks Rethinks NoSQL for Rapid Scaling & Cost-EfficiencyFreshworks Rethinks NoSQL for Rapid Scaling & Cost-Efficiency
Freshworks Rethinks NoSQL for Rapid Scaling & Cost-Efficiency
ScyllaDB
 
"Choosing proper type of scaling", Olena Syrota
"Choosing proper type of scaling", Olena Syrota"Choosing proper type of scaling", Olena Syrota
"Choosing proper type of scaling", Olena Syrota
Fwdays
 
HCL Notes and Domino License Cost Reduction in the World of DLAU
HCL Notes and Domino License Cost Reduction in the World of DLAUHCL Notes and Domino License Cost Reduction in the World of DLAU
HCL Notes and Domino License Cost Reduction in the World of DLAU
panagenda
 
zkStudyClub - LatticeFold: A Lattice-based Folding Scheme and its Application...
zkStudyClub - LatticeFold: A Lattice-based Folding Scheme and its Application...zkStudyClub - LatticeFold: A Lattice-based Folding Scheme and its Application...
zkStudyClub - LatticeFold: A Lattice-based Folding Scheme and its Application...
Alex Pruden
 
Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...
Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...
Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...
saastr
 
"Frontline Battles with DDoS: Best practices and Lessons Learned", Igor Ivaniuk
"Frontline Battles with DDoS: Best practices and Lessons Learned",  Igor Ivaniuk"Frontline Battles with DDoS: Best practices and Lessons Learned",  Igor Ivaniuk
"Frontline Battles with DDoS: Best practices and Lessons Learned", Igor Ivaniuk
Fwdays
 

Recently uploaded (20)

Harnessing the Power of NLP and Knowledge Graphs for Opioid Research
Harnessing the Power of NLP and Knowledge Graphs for Opioid ResearchHarnessing the Power of NLP and Knowledge Graphs for Opioid Research
Harnessing the Power of NLP and Knowledge Graphs for Opioid Research
 
Principle of conventional tomography-Bibash Shahi ppt..pptx
Principle of conventional tomography-Bibash Shahi ppt..pptxPrinciple of conventional tomography-Bibash Shahi ppt..pptx
Principle of conventional tomography-Bibash Shahi ppt..pptx
 
Northern Engraving | Nameplate Manufacturing Process - 2024
Northern Engraving | Nameplate Manufacturing Process - 2024Northern Engraving | Nameplate Manufacturing Process - 2024
Northern Engraving | Nameplate Manufacturing Process - 2024
 
Energy Efficient Video Encoding for Cloud and Edge Computing Instances
Energy Efficient Video Encoding for Cloud and Edge Computing InstancesEnergy Efficient Video Encoding for Cloud and Edge Computing Instances
Energy Efficient Video Encoding for Cloud and Edge Computing Instances
 
Biomedical Knowledge Graphs for Data Scientists and Bioinformaticians
Biomedical Knowledge Graphs for Data Scientists and BioinformaticiansBiomedical Knowledge Graphs for Data Scientists and Bioinformaticians
Biomedical Knowledge Graphs for Data Scientists and Bioinformaticians
 
GraphRAG for LifeSciences Hands-On with the Clinical Knowledge Graph
GraphRAG for LifeSciences Hands-On with the Clinical Knowledge GraphGraphRAG for LifeSciences Hands-On with the Clinical Knowledge Graph
GraphRAG for LifeSciences Hands-On with the Clinical Knowledge Graph
 
Introduction of Cybersecurity with OSS at Code Europe 2024
Introduction of Cybersecurity with OSS  at Code Europe 2024Introduction of Cybersecurity with OSS  at Code Europe 2024
Introduction of Cybersecurity with OSS at Code Europe 2024
 
Columbus Data & Analytics Wednesdays - June 2024
Columbus Data & Analytics Wednesdays - June 2024Columbus Data & Analytics Wednesdays - June 2024
Columbus Data & Analytics Wednesdays - June 2024
 
“How Axelera AI Uses Digital Compute-in-memory to Deliver Fast and Energy-eff...
“How Axelera AI Uses Digital Compute-in-memory to Deliver Fast and Energy-eff...“How Axelera AI Uses Digital Compute-in-memory to Deliver Fast and Energy-eff...
“How Axelera AI Uses Digital Compute-in-memory to Deliver Fast and Energy-eff...
 
9 CEO's who hit $100m ARR Share Their Top Growth Tactics Nathan Latka, Founde...
9 CEO's who hit $100m ARR Share Their Top Growth Tactics Nathan Latka, Founde...9 CEO's who hit $100m ARR Share Their Top Growth Tactics Nathan Latka, Founde...
9 CEO's who hit $100m ARR Share Their Top Growth Tactics Nathan Latka, Founde...
 
Driving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success StoryDriving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success Story
 
Taking AI to the Next Level in Manufacturing.pdf
Taking AI to the Next Level in Manufacturing.pdfTaking AI to the Next Level in Manufacturing.pdf
Taking AI to the Next Level in Manufacturing.pdf
 
Fueling AI with Great Data with Airbyte Webinar
Fueling AI with Great Data with Airbyte WebinarFueling AI with Great Data with Airbyte Webinar
Fueling AI with Great Data with Airbyte Webinar
 
Monitoring and Managing Anomaly Detection on OpenShift.pdf
Monitoring and Managing Anomaly Detection on OpenShift.pdfMonitoring and Managing Anomaly Detection on OpenShift.pdf
Monitoring and Managing Anomaly Detection on OpenShift.pdf
 
Freshworks Rethinks NoSQL for Rapid Scaling & Cost-Efficiency
Freshworks Rethinks NoSQL for Rapid Scaling & Cost-EfficiencyFreshworks Rethinks NoSQL for Rapid Scaling & Cost-Efficiency
Freshworks Rethinks NoSQL for Rapid Scaling & Cost-Efficiency
 
"Choosing proper type of scaling", Olena Syrota
"Choosing proper type of scaling", Olena Syrota"Choosing proper type of scaling", Olena Syrota
"Choosing proper type of scaling", Olena Syrota
 
HCL Notes and Domino License Cost Reduction in the World of DLAU
HCL Notes and Domino License Cost Reduction in the World of DLAUHCL Notes and Domino License Cost Reduction in the World of DLAU
HCL Notes and Domino License Cost Reduction in the World of DLAU
 
zkStudyClub - LatticeFold: A Lattice-based Folding Scheme and its Application...
zkStudyClub - LatticeFold: A Lattice-based Folding Scheme and its Application...zkStudyClub - LatticeFold: A Lattice-based Folding Scheme and its Application...
zkStudyClub - LatticeFold: A Lattice-based Folding Scheme and its Application...
 
Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...
Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...
Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...
 
"Frontline Battles with DDoS: Best practices and Lessons Learned", Igor Ivaniuk
"Frontline Battles with DDoS: Best practices and Lessons Learned",  Igor Ivaniuk"Frontline Battles with DDoS: Best practices and Lessons Learned",  Igor Ivaniuk
"Frontline Battles with DDoS: Best practices and Lessons Learned", Igor Ivaniuk
 

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.