SlideShare une entreprise Scribd logo
1  sur  33
Télécharger pour lire hors ligne
Intelligent Build Pipelines
from Jenkins to Gitlab
netz98 GmbH - Christian Münch / @cmuench 1
Jenkins
2
Jenkins Job List
netz98 GmbH - Christian Münch / @cmuench 3
Jenkins Job
netz98 GmbH - Christian Münch / @cmuench 4
Current Jenkins Setup
4 1 Job for every Magento Module (sometimes two CE/EE)
4 1 Magento Installation for every Magento Module
4 1 Database for every Magento Module
4 1 extra database for Integration tests
4 Manually compiled PHP versions.
4 Software is directly installed on host
4 Only few commits in most M1 repos
netz98 GmbH - Christian Münch / @cmuench 5
Disk Space! -> Magento 1 Modules
4 1x Magento 1 Module
4 Webroot: 175 MB
4 Database: 62 MB
4 Total with Log-Data: ~200 MB
4 50x Magento 1 Module -> 10 GB
netz98 GmbH - Christian Münch / @cmuench 6
Disk Space! -> Magento 2 Modules
4 1x Magento 2 Module
4 Webroot: 1,1 GB
4 Database: 82 MB
4 Total with Log-Data: ~1.200 MB
4 200 planned Modules: 240 GB
netz98 GmbH - Christian Münch / @cmuench 7
8
Simple CI Workflow
4 Configuration only with a single file
4 .gitlab-ci.yml
netz98 GmbH - Christian Münch / @cmuench 9
Simple Job Example
job1:
script: ls -l
netz98 GmbH - Christian Münch / @cmuench 10
Multiple Script Commands
job1:
script:
- cd myproject
- vendor/bin/phpunit
netz98 GmbH - Christian Münch / @cmuench 11
Multi Stages
stages:
- test
- deploy
run_tests:
stage: test
script: php run-some-tests.php
deploy_to_server:
stage: deploy
script: php mageDeploy2.php
netz98 GmbH - Christian Münch / @cmuench 12
 Pipeline View
netz98 GmbH - Christian Münch / @cmuench 13
Same Jobs in Docker Containers
stages:
- test
- deploy
image: php:5.6
run_tests:
stage: test
script: php run-some-tests.php
deploy_to_server:
stage: deploy
image: php:7.0
script: php mageDeploy2.php
netz98 GmbH - Christian Münch / @cmuench 14
Install Special Tools
before_script:
- apt-get install swaks
job1:
script:
- swaks --from foo@example.com --to bar@example.com
- ...
netz98 GmbH - Christian Münch / @cmuench 15
Artifacts
4 Runner sends generated artifacts to Gitlab Instance
via REST Api.
job1:
script: php generate_artifact.php
artifacts:
when: on_success
paths:
- path_to_artifact/
expire_in: 1 week
netz98 GmbH - Christian Münch / @cmuench 16
Sphinx Doc
stages:
- build
documentation_pdf:
stage: build
image: n98-sphinx-doc:1.4.6
script:
- cd doc
- make clean
- make latexpdf
retry: 2
only:
- master
artifacts:
when: on_success
paths:
- doc/_build/latex/*.pdf
expire_in: 1 week
netz98 GmbH - Christian Münch / @cmuench 17
Gitlab-Runner / Docker Execution
netz98 GmbH - Christian Münch / @cmuench 18
Test Build-Pipeline
Locally
brew install gitlab-runner # or use apt-get, yum, ....
cd <project-with-gitlab-ci-file>
gitlab-runner exec docker <job_in_gitlab_ci_config>
netz98 GmbH - Christian Münch / @cmuench 19
Docker Image Hierarchy
netz98 GmbH - Christian Münch / @cmuench 20
Image-Generation with CI-Pipeline
netz98 GmbH - Christian Münch / @cmuench 21
Technical Setup (Current) -> Unix Socket
Mounting
netz98 GmbH - Christian Münch / @cmuench 22
Technical Setup (Future) -> Docker in Docker
netz98 GmbH - Christian Münch / @cmuench 23
Testing Examples
24
Testing PHP Library
stages:
- test
ci_run_php_5:
stage: test
image: n98-php:5.6
script:
- composer install --prefer-dist
- bash build/gitlab/php_lint.sh
- vendor/bin/robo run:ci
coverage: '/^s*Lines:s*d+.d+%/'
artifacts:
when: on_success
paths:
- build/output/phpunit
expire_in: 1 week
netz98 GmbH - Christian Münch / @cmuench 25
Cache Vendor Directory
cache:
paths:
- vendor
untracked: true
netz98 GmbH - Christian Münch / @cmuench 26
XDebug
4 Installed but disabled by default
4 Activate during runtime
install_special_project_tools:
stage: setup
image: n98-php:7.0
script:
- docker-php-ext-enable xdebug
- vendor/bin/phpunit --colors --debug --coverage-html coverage-html-report --coverage-text
- coverage: '/^s*Lines:s*d+.d+%/'
netz98 GmbH - Christian Münch / @cmuench 27
Testing M2 Modules
stages:
- test
before_script:
- mysql_start
.job_template: &job_definition
script:
- install-module
- cd $MAGENTO_ROOT
- vendor/bin/phpunit -c dev/tests/unit/phpunit.xml.dist $CI_PROJECT_DIR/src/Test
EE-2.1:
image: n98-magento-ee:2.1
<<: *job_definition
EE-2.2:
image: n98-magento-ee:2.2
<<: *job_definition
netz98 GmbH - Christian Münch / @cmuench 28
Test M2 Theme
stages:
- test
before_script:
- mysql_start
.job_template: &job_definition
script:
- install-theme
CE-2.2:
image: n98-magento-ce:2.2
<<: *job_definition
EE-2.2:
image: n98-magento-ee:2.2
<<: *job_definition
netz98 GmbH - Christian Münch / @cmuench 29
Gitflow Support
Branches
4 Develop branch contains the
"bleeding edge"
4 Test only against latest
supported Magento versions.
4 Every Major Break -> New
Support Branch
netz98 GmbH - Christian Münch / @cmuench 30
Gitflow Support
Branches
4 One or more support branches
are available for older Magento
versions.
4 Needs backports for bugfixes,
features
4 Allows different CI configs
4 Needs strict Semantic
netz98 GmbH - Christian Münch / @cmuench 31
netz98 Gitlab CI Status
✔ PHP Images
✔ Magento Images
✔ Ansible, Sphinx-Doc Images, ...
✔ Git Mirror Sync
✔ Test PHP Libraries
✔ Test Magento 1 Modules
✔ Test Magento 2 Modules
◻ Project Builds (with docker-compose support)
◻ Deployments with specific versions (prototype available)
netz98 GmbH - Christian Münch / @cmuench 32
Links
4 https://store.fooman.co.nz/blog/harnessing-the-power-of-
composer-in-magento-2.html
4 https://docs.gitlab.com/ee/ci/docker/usingdockerbuild.html
4 https://media.ccc.de/v/froscon2017-1948-gitlab-
ciunddocker_registry
4 https://github.com/oleg-fiksel/SettingupGitLab-
CIundDocker_Registry
netz98 GmbH - Christian Münch / @cmuench 33

Contenu connexe

Tendances

Continuous integration
Continuous integrationContinuous integration
Continuous integrationamscanne
 
Build CICD Pipeline for Container Presentation Slides
Build CICD Pipeline for Container Presentation SlidesBuild CICD Pipeline for Container Presentation Slides
Build CICD Pipeline for Container Presentation SlidesAmazon Web Services
 
Devops Devops Devops
Devops Devops DevopsDevops Devops Devops
Devops Devops DevopsKris Buytaert
 
Docker Introduction
Docker IntroductionDocker Introduction
Docker IntroductionSparkbit
 
GitOps with ArgoCD
GitOps with ArgoCDGitOps with ArgoCD
GitOps with ArgoCDCloudOps2005
 
Getting Started with Azure Artifacts
Getting Started with Azure ArtifactsGetting Started with Azure Artifacts
Getting Started with Azure ArtifactsCallon Campbell
 
DevOps a pratical approach
DevOps a pratical approachDevOps a pratical approach
DevOps a pratical approachSiderlan Santos
 
Transforming Organizations with CI/CD
Transforming Organizations with CI/CDTransforming Organizations with CI/CD
Transforming Organizations with CI/CDCprime
 
GitOps Toolkit (Cloud Native Nordics Tech Talk)
GitOps Toolkit (Cloud Native Nordics Tech Talk)GitOps Toolkit (Cloud Native Nordics Tech Talk)
GitOps Toolkit (Cloud Native Nordics Tech Talk)Weaveworks
 
Gitlab ci, cncf.sk
Gitlab ci, cncf.skGitlab ci, cncf.sk
Gitlab ci, cncf.skJuraj Hantak
 
Formation autour de git et git lab
Formation autour de git et git labFormation autour de git et git lab
Formation autour de git et git labAbdelghani Azri
 
CICD Pipeline Using Github Actions
CICD Pipeline Using Github ActionsCICD Pipeline Using Github Actions
CICD Pipeline Using Github ActionsKumar Shìvam
 
Understanding DevOps
Understanding DevOpsUnderstanding DevOps
Understanding DevOpsInnoTech
 

Tendances (20)

Continuous integration
Continuous integrationContinuous integration
Continuous integration
 
CI/CD with GitHub Actions
CI/CD with GitHub ActionsCI/CD with GitHub Actions
CI/CD with GitHub Actions
 
Build CICD Pipeline for Container Presentation Slides
Build CICD Pipeline for Container Presentation SlidesBuild CICD Pipeline for Container Presentation Slides
Build CICD Pipeline for Container Presentation Slides
 
Gitlab CI/CD
Gitlab CI/CDGitlab CI/CD
Gitlab CI/CD
 
Jenkins
JenkinsJenkins
Jenkins
 
DevOps
DevOps DevOps
DevOps
 
Devops Devops Devops
Devops Devops DevopsDevops Devops Devops
Devops Devops Devops
 
Docker Introduction
Docker IntroductionDocker Introduction
Docker Introduction
 
GitOps with ArgoCD
GitOps with ArgoCDGitOps with ArgoCD
GitOps with ArgoCD
 
Getting Started with Azure Artifacts
Getting Started with Azure ArtifactsGetting Started with Azure Artifacts
Getting Started with Azure Artifacts
 
DevOps a pratical approach
DevOps a pratical approachDevOps a pratical approach
DevOps a pratical approach
 
Transforming Organizations with CI/CD
Transforming Organizations with CI/CDTransforming Organizations with CI/CD
Transforming Organizations with CI/CD
 
GitOps Toolkit (Cloud Native Nordics Tech Talk)
GitOps Toolkit (Cloud Native Nordics Tech Talk)GitOps Toolkit (Cloud Native Nordics Tech Talk)
GitOps Toolkit (Cloud Native Nordics Tech Talk)
 
Gitlab ci, cncf.sk
Gitlab ci, cncf.skGitlab ci, cncf.sk
Gitlab ci, cncf.sk
 
Formation autour de git et git lab
Formation autour de git et git labFormation autour de git et git lab
Formation autour de git et git lab
 
CICD Pipeline Using Github Actions
CICD Pipeline Using Github ActionsCICD Pipeline Using Github Actions
CICD Pipeline Using Github Actions
 
git KT .pptx
git KT .pptxgit KT .pptx
git KT .pptx
 
Gitlab ci-cd
Gitlab ci-cdGitlab ci-cd
Gitlab ci-cd
 
Understanding DevOps
Understanding DevOpsUnderstanding DevOps
Understanding DevOps
 
DevOps
DevOpsDevOps
DevOps
 

Similaire à Jenkins to Gitlab - Intelligent Build-Pipelines

Continuous integration / continuous delivery of web applications, Eugen Kuzmi...
Continuous integration / continuous delivery of web applications, Eugen Kuzmi...Continuous integration / continuous delivery of web applications, Eugen Kuzmi...
Continuous integration / continuous delivery of web applications, Eugen Kuzmi...Evgeniy Kuzmin
 
Magento 2 Development
Magento 2 DevelopmentMagento 2 Development
Magento 2 DevelopmentDuke Dao
 
Lean Drupal Repositories with Composer and Drush
Lean Drupal Repositories with Composer and DrushLean Drupal Repositories with Composer and Drush
Lean Drupal Repositories with Composer and DrushPantheon
 
Effizientere WordPress-Plugin-Entwicklung mit Softwaretests
Effizientere WordPress-Plugin-Entwicklung mit SoftwaretestsEffizientere WordPress-Plugin-Entwicklung mit Softwaretests
Effizientere WordPress-Plugin-Entwicklung mit SoftwaretestsDECK36
 
Continuous integration / continuous delivery
Continuous integration / continuous deliveryContinuous integration / continuous delivery
Continuous integration / continuous deliveryEatDog
 
Zendcon scaling magento
Zendcon scaling magentoZendcon scaling magento
Zendcon scaling magentoMathew Beane
 
Integration Testing with Behat drupal
Integration Testing with Behat drupalIntegration Testing with Behat drupal
Integration Testing with Behat drupalOscar Merida
 
Continuous Integration/ Continuous Delivery of web applications
Continuous Integration/ Continuous Delivery of web applicationsContinuous Integration/ Continuous Delivery of web applications
Continuous Integration/ Continuous Delivery of web applicationsEvgeniy Kuzmin
 
CodeIgniter Lab
CodeIgniter LabCodeIgniter Lab
CodeIgniter LabLeo Nguyen
 
Chef arista devops days a'dam 2015
Chef arista devops days a'dam 2015Chef arista devops days a'dam 2015
Chef arista devops days a'dam 2015Edwin Beekman
 
Openstack Third-Party CI and the review of a few Openstack Infrastructure pro...
Openstack Third-Party CI and the review of a few Openstack Infrastructure pro...Openstack Third-Party CI and the review of a few Openstack Infrastructure pro...
Openstack Third-Party CI and the review of a few Openstack Infrastructure pro...Evgeny Antyshev
 
John Spray - Ceph in Kubernetes
John Spray - Ceph in KubernetesJohn Spray - Ceph in Kubernetes
John Spray - Ceph in KubernetesShapeBlue
 
C# Production Debugging Made Easy
 C# Production Debugging Made Easy C# Production Debugging Made Easy
C# Production Debugging Made EasyAlon Fliess
 
Developing MIPS Exploits to Hack Routers
Developing MIPS Exploits to Hack RoutersDeveloping MIPS Exploits to Hack Routers
Developing MIPS Exploits to Hack RoutersOnur Alanbel
 
Phpworld.2015 scaling magento
Phpworld.2015 scaling magentoPhpworld.2015 scaling magento
Phpworld.2015 scaling magentoMathew Beane
 
OSDC 2019 | Running backups with Ceph-to-Ceph by Michael Raabe
OSDC 2019 | Running backups with Ceph-to-Ceph by Michael RaabeOSDC 2019 | Running backups with Ceph-to-Ceph by Michael Raabe
OSDC 2019 | Running backups with Ceph-to-Ceph by Michael RaabeNETWAYS
 

Similaire à Jenkins to Gitlab - Intelligent Build-Pipelines (20)

Continuous integration / continuous delivery of web applications, Eugen Kuzmi...
Continuous integration / continuous delivery of web applications, Eugen Kuzmi...Continuous integration / continuous delivery of web applications, Eugen Kuzmi...
Continuous integration / continuous delivery of web applications, Eugen Kuzmi...
 
Magento 2 Development
Magento 2 DevelopmentMagento 2 Development
Magento 2 Development
 
Lean Drupal Repositories with Composer and Drush
Lean Drupal Repositories with Composer and DrushLean Drupal Repositories with Composer and Drush
Lean Drupal Repositories with Composer and Drush
 
Magento 2 Deploy Strategies
Magento 2 Deploy StrategiesMagento 2 Deploy Strategies
Magento 2 Deploy Strategies
 
Effizientere WordPress-Plugin-Entwicklung mit Softwaretests
Effizientere WordPress-Plugin-Entwicklung mit SoftwaretestsEffizientere WordPress-Plugin-Entwicklung mit Softwaretests
Effizientere WordPress-Plugin-Entwicklung mit Softwaretests
 
Continuous integration / continuous delivery
Continuous integration / continuous deliveryContinuous integration / continuous delivery
Continuous integration / continuous delivery
 
Zendcon scaling magento
Zendcon scaling magentoZendcon scaling magento
Zendcon scaling magento
 
Integration Testing with Behat drupal
Integration Testing with Behat drupalIntegration Testing with Behat drupal
Integration Testing with Behat drupal
 
Howto Pxeboot
Howto PxebootHowto Pxeboot
Howto Pxeboot
 
Continuous Integration/ Continuous Delivery of web applications
Continuous Integration/ Continuous Delivery of web applicationsContinuous Integration/ Continuous Delivery of web applications
Continuous Integration/ Continuous Delivery of web applications
 
CodeIgniter Lab
CodeIgniter LabCodeIgniter Lab
CodeIgniter Lab
 
Aci dp
Aci dpAci dp
Aci dp
 
Chef arista devops days a'dam 2015
Chef arista devops days a'dam 2015Chef arista devops days a'dam 2015
Chef arista devops days a'dam 2015
 
Openstack Third-Party CI and the review of a few Openstack Infrastructure pro...
Openstack Third-Party CI and the review of a few Openstack Infrastructure pro...Openstack Third-Party CI and the review of a few Openstack Infrastructure pro...
Openstack Third-Party CI and the review of a few Openstack Infrastructure pro...
 
John Spray - Ceph in Kubernetes
John Spray - Ceph in KubernetesJohn Spray - Ceph in Kubernetes
John Spray - Ceph in Kubernetes
 
C# Production Debugging Made Easy
 C# Production Debugging Made Easy C# Production Debugging Made Easy
C# Production Debugging Made Easy
 
Native Hadoop with prebuilt spark
Native Hadoop with prebuilt sparkNative Hadoop with prebuilt spark
Native Hadoop with prebuilt spark
 
Developing MIPS Exploits to Hack Routers
Developing MIPS Exploits to Hack RoutersDeveloping MIPS Exploits to Hack Routers
Developing MIPS Exploits to Hack Routers
 
Phpworld.2015 scaling magento
Phpworld.2015 scaling magentoPhpworld.2015 scaling magento
Phpworld.2015 scaling magento
 
OSDC 2019 | Running backups with Ceph-to-Ceph by Michael Raabe
OSDC 2019 | Running backups with Ceph-to-Ceph by Michael RaabeOSDC 2019 | Running backups with Ceph-to-Ceph by Michael Raabe
OSDC 2019 | Running backups with Ceph-to-Ceph by Michael Raabe
 

Plus de Christian Münch

n98-magerun2 - Presentation 2020
n98-magerun2 - Presentation 2020n98-magerun2 - Presentation 2020
n98-magerun2 - Presentation 2020Christian Münch
 
Magento 2 Zertifizierung - Wissenswertes und ein paar Tipps
Magento 2 Zertifizierung - Wissenswertes und ein paar TippsMagento 2 Zertifizierung - Wissenswertes und ein paar Tipps
Magento 2 Zertifizierung - Wissenswertes und ein paar TippsChristian Münch
 
Magento Headless - Stammtisch Rhein-Main
Magento Headless - Stammtisch Rhein-MainMagento Headless - Stammtisch Rhein-Main
Magento Headless - Stammtisch Rhein-MainChristian Münch
 
Continous Integration in einem Open Source Projekt
Continous Integration in einem Open Source ProjektContinous Integration in einem Open Source Projekt
Continous Integration in einem Open Source ProjektChristian Münch
 
Magento auf der Kommandozeile: n98-magerun, ein netz98 Tool
Magento auf der Kommandozeile: n98-magerun, ein netz98 ToolMagento auf der Kommandozeile: n98-magerun, ein netz98 Tool
Magento auf der Kommandozeile: n98-magerun, ein netz98 ToolChristian Münch
 
Abläufe mit PHP und Phing automatisieren
Abläufe mit PHP und Phing automatisierenAbläufe mit PHP und Phing automatisieren
Abläufe mit PHP und Phing automatisierenChristian Münch
 
TV App Development - Überblick und Einblick
TV App Development - Überblick und EinblickTV App Development - Überblick und Einblick
TV App Development - Überblick und EinblickChristian Münch
 
Abläufe mit Phing automatisieren
Abläufe mit Phing automatisierenAbläufe mit Phing automatisieren
Abläufe mit Phing automatisierenChristian Münch
 
Caching in PHP - Status Quo
Caching in PHP - Status QuoCaching in PHP - Status Quo
Caching in PHP - Status QuoChristian Münch
 
INMON CMS Entwicklung / Funktionen
INMON CMS Entwicklung / FunktionenINMON CMS Entwicklung / Funktionen
INMON CMS Entwicklung / FunktionenChristian Münch
 

Plus de Christian Münch (13)

DDEV - Extended
DDEV - ExtendedDDEV - Extended
DDEV - Extended
 
n98-magerun2 - Presentation 2020
n98-magerun2 - Presentation 2020n98-magerun2 - Presentation 2020
n98-magerun2 - Presentation 2020
 
Magento 2 Zertifizierung - Wissenswertes und ein paar Tipps
Magento 2 Zertifizierung - Wissenswertes und ein paar TippsMagento 2 Zertifizierung - Wissenswertes und ein paar Tipps
Magento 2 Zertifizierung - Wissenswertes und ein paar Tipps
 
12 Factor Apps with PHP
12 Factor Apps with PHP12 Factor Apps with PHP
12 Factor Apps with PHP
 
Magento Headless - Stammtisch Rhein-Main
Magento Headless - Stammtisch Rhein-MainMagento Headless - Stammtisch Rhein-Main
Magento Headless - Stammtisch Rhein-Main
 
Continous Integration in einem Open Source Projekt
Continous Integration in einem Open Source ProjektContinous Integration in einem Open Source Projekt
Continous Integration in einem Open Source Projekt
 
Magento auf der Kommandozeile: n98-magerun, ein netz98 Tool
Magento auf der Kommandozeile: n98-magerun, ein netz98 ToolMagento auf der Kommandozeile: n98-magerun, ein netz98 Tool
Magento auf der Kommandozeile: n98-magerun, ein netz98 Tool
 
Abläufe mit PHP und Phing automatisieren
Abläufe mit PHP und Phing automatisierenAbläufe mit PHP und Phing automatisieren
Abläufe mit PHP und Phing automatisieren
 
TV App Development - Überblick und Einblick
TV App Development - Überblick und EinblickTV App Development - Überblick und Einblick
TV App Development - Überblick und Einblick
 
Abläufe mit Phing automatisieren
Abläufe mit Phing automatisierenAbläufe mit Phing automatisieren
Abläufe mit Phing automatisieren
 
Caching in PHP - Status Quo
Caching in PHP - Status QuoCaching in PHP - Status Quo
Caching in PHP - Status Quo
 
INMON CMS Entwicklung / Funktionen
INMON CMS Entwicklung / FunktionenINMON CMS Entwicklung / Funktionen
INMON CMS Entwicklung / Funktionen
 
Php Schulung
Php SchulungPhp Schulung
Php Schulung
 

Dernier

Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEarley Information Science
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
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...Miguel Araújo
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUK Journal
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?Igalia
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Enterprise Knowledge
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessPixlogix Infotech
 
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...Martijn de Jong
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 

Dernier (20)

Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
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...
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your 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...
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 

Jenkins to Gitlab - Intelligent Build-Pipelines

  • 1. Intelligent Build Pipelines from Jenkins to Gitlab netz98 GmbH - Christian Münch / @cmuench 1
  • 3. Jenkins Job List netz98 GmbH - Christian Münch / @cmuench 3
  • 4. Jenkins Job netz98 GmbH - Christian Münch / @cmuench 4
  • 5. Current Jenkins Setup 4 1 Job for every Magento Module (sometimes two CE/EE) 4 1 Magento Installation for every Magento Module 4 1 Database for every Magento Module 4 1 extra database for Integration tests 4 Manually compiled PHP versions. 4 Software is directly installed on host 4 Only few commits in most M1 repos netz98 GmbH - Christian Münch / @cmuench 5
  • 6. Disk Space! -> Magento 1 Modules 4 1x Magento 1 Module 4 Webroot: 175 MB 4 Database: 62 MB 4 Total with Log-Data: ~200 MB 4 50x Magento 1 Module -> 10 GB netz98 GmbH - Christian Münch / @cmuench 6
  • 7. Disk Space! -> Magento 2 Modules 4 1x Magento 2 Module 4 Webroot: 1,1 GB 4 Database: 82 MB 4 Total with Log-Data: ~1.200 MB 4 200 planned Modules: 240 GB netz98 GmbH - Christian Münch / @cmuench 7
  • 8. 8
  • 9. Simple CI Workflow 4 Configuration only with a single file 4 .gitlab-ci.yml netz98 GmbH - Christian Münch / @cmuench 9
  • 10. Simple Job Example job1: script: ls -l netz98 GmbH - Christian Münch / @cmuench 10
  • 11. Multiple Script Commands job1: script: - cd myproject - vendor/bin/phpunit netz98 GmbH - Christian Münch / @cmuench 11
  • 12. Multi Stages stages: - test - deploy run_tests: stage: test script: php run-some-tests.php deploy_to_server: stage: deploy script: php mageDeploy2.php netz98 GmbH - Christian Münch / @cmuench 12
  • 13.  Pipeline View netz98 GmbH - Christian Münch / @cmuench 13
  • 14. Same Jobs in Docker Containers stages: - test - deploy image: php:5.6 run_tests: stage: test script: php run-some-tests.php deploy_to_server: stage: deploy image: php:7.0 script: php mageDeploy2.php netz98 GmbH - Christian Münch / @cmuench 14
  • 15. Install Special Tools before_script: - apt-get install swaks job1: script: - swaks --from foo@example.com --to bar@example.com - ... netz98 GmbH - Christian Münch / @cmuench 15
  • 16. Artifacts 4 Runner sends generated artifacts to Gitlab Instance via REST Api. job1: script: php generate_artifact.php artifacts: when: on_success paths: - path_to_artifact/ expire_in: 1 week netz98 GmbH - Christian Münch / @cmuench 16
  • 17. Sphinx Doc stages: - build documentation_pdf: stage: build image: n98-sphinx-doc:1.4.6 script: - cd doc - make clean - make latexpdf retry: 2 only: - master artifacts: when: on_success paths: - doc/_build/latex/*.pdf expire_in: 1 week netz98 GmbH - Christian Münch / @cmuench 17
  • 18. Gitlab-Runner / Docker Execution netz98 GmbH - Christian Münch / @cmuench 18
  • 19. Test Build-Pipeline Locally brew install gitlab-runner # or use apt-get, yum, .... cd <project-with-gitlab-ci-file> gitlab-runner exec docker <job_in_gitlab_ci_config> netz98 GmbH - Christian Münch / @cmuench 19
  • 20. Docker Image Hierarchy netz98 GmbH - Christian Münch / @cmuench 20
  • 21. Image-Generation with CI-Pipeline netz98 GmbH - Christian Münch / @cmuench 21
  • 22. Technical Setup (Current) -> Unix Socket Mounting netz98 GmbH - Christian Münch / @cmuench 22
  • 23. Technical Setup (Future) -> Docker in Docker netz98 GmbH - Christian Münch / @cmuench 23
  • 25. Testing PHP Library stages: - test ci_run_php_5: stage: test image: n98-php:5.6 script: - composer install --prefer-dist - bash build/gitlab/php_lint.sh - vendor/bin/robo run:ci coverage: '/^s*Lines:s*d+.d+%/' artifacts: when: on_success paths: - build/output/phpunit expire_in: 1 week netz98 GmbH - Christian Münch / @cmuench 25
  • 26. Cache Vendor Directory cache: paths: - vendor untracked: true netz98 GmbH - Christian Münch / @cmuench 26
  • 27. XDebug 4 Installed but disabled by default 4 Activate during runtime install_special_project_tools: stage: setup image: n98-php:7.0 script: - docker-php-ext-enable xdebug - vendor/bin/phpunit --colors --debug --coverage-html coverage-html-report --coverage-text - coverage: '/^s*Lines:s*d+.d+%/' netz98 GmbH - Christian Münch / @cmuench 27
  • 28. Testing M2 Modules stages: - test before_script: - mysql_start .job_template: &job_definition script: - install-module - cd $MAGENTO_ROOT - vendor/bin/phpunit -c dev/tests/unit/phpunit.xml.dist $CI_PROJECT_DIR/src/Test EE-2.1: image: n98-magento-ee:2.1 <<: *job_definition EE-2.2: image: n98-magento-ee:2.2 <<: *job_definition netz98 GmbH - Christian Münch / @cmuench 28
  • 29. Test M2 Theme stages: - test before_script: - mysql_start .job_template: &job_definition script: - install-theme CE-2.2: image: n98-magento-ce:2.2 <<: *job_definition EE-2.2: image: n98-magento-ee:2.2 <<: *job_definition netz98 GmbH - Christian Münch / @cmuench 29
  • 30. Gitflow Support Branches 4 Develop branch contains the "bleeding edge" 4 Test only against latest supported Magento versions. 4 Every Major Break -> New Support Branch netz98 GmbH - Christian Münch / @cmuench 30
  • 31. Gitflow Support Branches 4 One or more support branches are available for older Magento versions. 4 Needs backports for bugfixes, features 4 Allows different CI configs 4 Needs strict Semantic netz98 GmbH - Christian Münch / @cmuench 31
  • 32. netz98 Gitlab CI Status ✔ PHP Images ✔ Magento Images ✔ Ansible, Sphinx-Doc Images, ... ✔ Git Mirror Sync ✔ Test PHP Libraries ✔ Test Magento 1 Modules ✔ Test Magento 2 Modules ◻ Project Builds (with docker-compose support) ◻ Deployments with specific versions (prototype available) netz98 GmbH - Christian Münch / @cmuench 32
  • 33. Links 4 https://store.fooman.co.nz/blog/harnessing-the-power-of- composer-in-magento-2.html 4 https://docs.gitlab.com/ee/ci/docker/usingdockerbuild.html 4 https://media.ccc.de/v/froscon2017-1948-gitlab- ciunddocker_registry 4 https://github.com/oleg-fiksel/SettingupGitLab- CIundDocker_Registry netz98 GmbH - Christian Münch / @cmuench 33