SlideShare a Scribd company logo
1 of 37
Download to read offline
Continuous Delivery
with
Docker &
Jenkins Job Builder
Wouter Lagerweij
@wouterla
Prepare!
See the Readme.html in the main directory:
● copy contents of usb stick to harddrive
● open workshop-docker-jenkins dir
● type ‘vagrant up’
● type ‘vagrant ssh’
● type ‘docker ps’
The Goal
Pipeline view at Persgroep Online Services
The Goal
Automate Everything
● Everything in version control
○ Including infrastructure
○ Build server and configuration
○ Deployment scripts
We are going to...
● Automate creation of Jenkins Jobs
● Automate creation of deployment package
(Docker container)
● Automate deployment of Docker container
● Automate creation of full Delivery Pipeline in
Jenkins
Using
● Jenkins
● Jenkins Job Builder
● Docker
● Bash;-)
docker run
$ docker run -d -v /home/vagrant/.m2:/root/.m2
-v /var/run/docker.sock:/var/run/docker.sock
-p 8080:8080
--name jenkins wouterla/docker-jenkins
● ports: -p <host-port>:<container-port>
● volumes: -v <host-dir>:<container-dir>
● -d: background
● --name: to find it by
● Image: <repository>/<name>:<tag>
https://docs.docker.com/reference/commandline/cli/
Docker stop
docker stop <name>
docker stop <container-id>
docker rm <name>
docker ps
Work
Start Jenkins container on port 8081
then
Stop, and switch back to 8080
Running Jenkins Job Builder
docker run wouterla/docker-jenkins-job-builder
Needs access to jenkins!
docker run --link jenkins:jenkins wouterla/docker-jenkins-job-builder
● link: <container-name>:<alias>
Our pipeline
Jenkins Job Builder
● Jobs
● Projects
● Job Templates
● Variables
Variable types and scope
● project -> template
● defaults
● YAML references
● macros
● within and across files
Project / template
YAML references
Macros
Work
Add a new step to the pipeline that runs the
maven ‘install’ goal
Docker build
● -t <repository>/<name>:<tag>
● . (or -f)
But today:
$> ./build_docker_jenkins_job_builder.sh
Dockerfile
Work
Complete the Dockerfile for demo app, and
build it locally
Hint: You can run the app with:
java -jar jetty-runner.jar <war-file>
Dockerfile
Docker push/pull
● login
● push <tag>
● pull <tag>
Work
Add step to pipeline that builds the docker
image for our demo app
Work
● Add ‘test’ phase to pipeline
● Add step that deploys demo app on port
8081
Work
Add ‘production’ phase and environment
running on port 8082
Work
Add second pipeline, building ‘workshop’
branch
Work
Add ‘smoketest’ step to test and production
phase
Continuous Delivery with Docker and Jenkins Job Builder

More Related Content

Viewers also liked

Testing in a continuous delivery world - Lean Agile Scotland
Testing in a continuous delivery world - Lean Agile ScotlandTesting in a continuous delivery world - Lean Agile Scotland
Testing in a continuous delivery world - Lean Agile ScotlandWouter Lagerweij
 
Docker dev, test & production (afas)
Docker  dev, test & production (afas)Docker  dev, test & production (afas)
Docker dev, test & production (afas)Wouter Lagerweij
 
Testing in a continuous delivery world - continuous delivery Amsterdam meetup
Testing in a continuous delivery world - continuous delivery Amsterdam meetupTesting in a continuous delivery world - continuous delivery Amsterdam meetup
Testing in a continuous delivery world - continuous delivery Amsterdam meetupWouter Lagerweij
 
The sprint goal as a business test
The sprint goal as a business testThe sprint goal as a business test
The sprint goal as a business testWouter Lagerweij
 
Testing in a continuous delivery world
Testing in a continuous delivery worldTesting in a continuous delivery world
Testing in a continuous delivery worldWouter Lagerweij
 
Metrics to guide: agile fluency, continuous delivery and product teams
Metrics to guide: agile fluency, continuous delivery and product teamsMetrics to guide: agile fluency, continuous delivery and product teams
Metrics to guide: agile fluency, continuous delivery and product teamsWouter Lagerweij
 
Git workflow step by step
Git workflow step by stepGit workflow step by step
Git workflow step by stepBinh Quan Duc
 
Microservices with Docker, Kubernetes, and Jenkins
Microservices with Docker, Kubernetes, and JenkinsMicroservices with Docker, Kubernetes, and Jenkins
Microservices with Docker, Kubernetes, and JenkinsRed Hat Developers
 
Continuous Integration/Deployment with Docker and Jenkins
Continuous Integration/Deployment with Docker and JenkinsContinuous Integration/Deployment with Docker and Jenkins
Continuous Integration/Deployment with Docker and JenkinsFrancesco Bruni
 
Ruby CI with Jenkins
Ruby CI with JenkinsRuby CI with Jenkins
Ruby CI with Jenkinscowboyd
 
GitHub Pull Request Builder for Drupal
GitHub Pull Request Builder for DrupalGitHub Pull Request Builder for Drupal
GitHub Pull Request Builder for DrupalJuampy NR
 
Jenkins Job Builder: our experience
Jenkins Job Builder: our experienceJenkins Job Builder: our experience
Jenkins Job Builder: our experienceTimofey Turenko
 
Intro to Codefresh YAML
Intro to Codefresh YAML  Intro to Codefresh YAML
Intro to Codefresh YAML Codefresh
 

Viewers also liked (15)

INVEST
INVESTINVEST
INVEST
 
Testing in a continuous delivery world - Lean Agile Scotland
Testing in a continuous delivery world - Lean Agile ScotlandTesting in a continuous delivery world - Lean Agile Scotland
Testing in a continuous delivery world - Lean Agile Scotland
 
Why user stories
Why user storiesWhy user stories
Why user stories
 
Docker dev, test & production (afas)
Docker  dev, test & production (afas)Docker  dev, test & production (afas)
Docker dev, test & production (afas)
 
Testing in a continuous delivery world - continuous delivery Amsterdam meetup
Testing in a continuous delivery world - continuous delivery Amsterdam meetupTesting in a continuous delivery world - continuous delivery Amsterdam meetup
Testing in a continuous delivery world - continuous delivery Amsterdam meetup
 
The sprint goal as a business test
The sprint goal as a business testThe sprint goal as a business test
The sprint goal as a business test
 
Testing in a continuous delivery world
Testing in a continuous delivery worldTesting in a continuous delivery world
Testing in a continuous delivery world
 
Metrics to guide: agile fluency, continuous delivery and product teams
Metrics to guide: agile fluency, continuous delivery and product teamsMetrics to guide: agile fluency, continuous delivery and product teams
Metrics to guide: agile fluency, continuous delivery and product teams
 
Git workflow step by step
Git workflow step by stepGit workflow step by step
Git workflow step by step
 
Microservices with Docker, Kubernetes, and Jenkins
Microservices with Docker, Kubernetes, and JenkinsMicroservices with Docker, Kubernetes, and Jenkins
Microservices with Docker, Kubernetes, and Jenkins
 
Continuous Integration/Deployment with Docker and Jenkins
Continuous Integration/Deployment with Docker and JenkinsContinuous Integration/Deployment with Docker and Jenkins
Continuous Integration/Deployment with Docker and Jenkins
 
Ruby CI with Jenkins
Ruby CI with JenkinsRuby CI with Jenkins
Ruby CI with Jenkins
 
GitHub Pull Request Builder for Drupal
GitHub Pull Request Builder for DrupalGitHub Pull Request Builder for Drupal
GitHub Pull Request Builder for Drupal
 
Jenkins Job Builder: our experience
Jenkins Job Builder: our experienceJenkins Job Builder: our experience
Jenkins Job Builder: our experience
 
Intro to Codefresh YAML
Intro to Codefresh YAML  Intro to Codefresh YAML
Intro to Codefresh YAML
 

More from Wouter Lagerweij

Transparency is a slippery slope
Transparency is a slippery slopeTransparency is a slippery slope
Transparency is a slippery slopeWouter Lagerweij
 
Cash to concept - Bringing a legacy system under test
Cash to concept - Bringing a legacy system under testCash to concept - Bringing a legacy system under test
Cash to concept - Bringing a legacy system under testWouter Lagerweij
 
Measuring continuous delivery
Measuring continuous deliveryMeasuring continuous delivery
Measuring continuous deliveryWouter Lagerweij
 
XP2017: Metrics to guide agile fluency, continuous delivery and product teams
XP2017: Metrics to guide  agile fluency, continuous delivery and product teamsXP2017: Metrics to guide  agile fluency, continuous delivery and product teams
XP2017: Metrics to guide agile fluency, continuous delivery and product teamsWouter Lagerweij
 
Xp2017 agile fluency choose your own adventure
Xp2017 agile fluency   choose your own adventureXp2017 agile fluency   choose your own adventure
Xp2017 agile fluency choose your own adventureWouter Lagerweij
 
Technical excellence 20120119
Technical excellence 20120119Technical excellence 20120119
Technical excellence 20120119Wouter Lagerweij
 

More from Wouter Lagerweij (8)

Transparency is a slippery slope
Transparency is a slippery slopeTransparency is a slippery slope
Transparency is a slippery slope
 
Testing 1, 2, 3, ...
Testing 1, 2, 3, ... Testing 1, 2, 3, ...
Testing 1, 2, 3, ...
 
Cash to concept - Bringing a legacy system under test
Cash to concept - Bringing a legacy system under testCash to concept - Bringing a legacy system under test
Cash to concept - Bringing a legacy system under test
 
Measuring continuous delivery
Measuring continuous deliveryMeasuring continuous delivery
Measuring continuous delivery
 
XP2017: Metrics to guide agile fluency, continuous delivery and product teams
XP2017: Metrics to guide  agile fluency, continuous delivery and product teamsXP2017: Metrics to guide  agile fluency, continuous delivery and product teams
XP2017: Metrics to guide agile fluency, continuous delivery and product teams
 
Xp2017 agile fluency choose your own adventure
Xp2017 agile fluency   choose your own adventureXp2017 agile fluency   choose your own adventure
Xp2017 agile fluency choose your own adventure
 
Technical excellence 20120119
Technical excellence 20120119Technical excellence 20120119
Technical excellence 20120119
 
Coding Dojo In 5 minutes
Coding Dojo In 5 minutesCoding Dojo In 5 minutes
Coding Dojo In 5 minutes
 

Recently uploaded

KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxKnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxTier1 app
 
MYjobs Presentation Django-based project
MYjobs Presentation Django-based projectMYjobs Presentation Django-based project
MYjobs Presentation Django-based projectAnoyGreter
 
What is Advanced Excel and what are some best practices for designing and cre...
What is Advanced Excel and what are some best practices for designing and cre...What is Advanced Excel and what are some best practices for designing and cre...
What is Advanced Excel and what are some best practices for designing and cre...Technogeeks
 
Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...
Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...
Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...Angel Borroy López
 
英国UN学位证,北安普顿大学毕业证书1:1制作
英国UN学位证,北安普顿大学毕业证书1:1制作英国UN学位证,北安普顿大学毕业证书1:1制作
英国UN学位证,北安普顿大学毕业证书1:1制作qr0udbr0
 
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...Cizo Technology Services
 
Cyber security and its impact on E commerce
Cyber security and its impact on E commerceCyber security and its impact on E commerce
Cyber security and its impact on E commercemanigoyal112
 
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...Natan Silnitsky
 
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdfGOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdfAlina Yurenko
 
Introduction Computer Science - Software Design.pdf
Introduction Computer Science - Software Design.pdfIntroduction Computer Science - Software Design.pdf
Introduction Computer Science - Software Design.pdfFerryKemperman
 
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...confluent
 
How to Track Employee Performance A Comprehensive Guide.pdf
How to Track Employee Performance A Comprehensive Guide.pdfHow to Track Employee Performance A Comprehensive Guide.pdf
How to Track Employee Performance A Comprehensive Guide.pdfLivetecs LLC
 
Buds n Tech IT Solutions: Top-Notch Web Services in Noida
Buds n Tech IT Solutions: Top-Notch Web Services in NoidaBuds n Tech IT Solutions: Top-Notch Web Services in Noida
Buds n Tech IT Solutions: Top-Notch Web Services in Noidabntitsolutionsrishis
 
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio, Inc.
 
Ahmed Motair CV April 2024 (Senior SW Developer)
Ahmed Motair CV April 2024 (Senior SW Developer)Ahmed Motair CV April 2024 (Senior SW Developer)
Ahmed Motair CV April 2024 (Senior SW Developer)Ahmed Mater
 
Cloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEECloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEEVICTOR MAESTRE RAMIREZ
 
Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024Andreas Granig
 
Odoo 14 - eLearning Module In Odoo 14 Enterprise
Odoo 14 - eLearning Module In Odoo 14 EnterpriseOdoo 14 - eLearning Module In Odoo 14 Enterprise
Odoo 14 - eLearning Module In Odoo 14 Enterprisepreethippts
 
A healthy diet for your Java application Devoxx France.pdf
A healthy diet for your Java application Devoxx France.pdfA healthy diet for your Java application Devoxx France.pdf
A healthy diet for your Java application Devoxx France.pdfMarharyta Nedzelska
 

Recently uploaded (20)

KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxKnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
 
MYjobs Presentation Django-based project
MYjobs Presentation Django-based projectMYjobs Presentation Django-based project
MYjobs Presentation Django-based project
 
What is Advanced Excel and what are some best practices for designing and cre...
What is Advanced Excel and what are some best practices for designing and cre...What is Advanced Excel and what are some best practices for designing and cre...
What is Advanced Excel and what are some best practices for designing and cre...
 
Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...
Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...
Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...
 
英国UN学位证,北安普顿大学毕业证书1:1制作
英国UN学位证,北安普顿大学毕业证书1:1制作英国UN学位证,北安普顿大学毕业证书1:1制作
英国UN学位证,北安普顿大学毕业证书1:1制作
 
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
 
Cyber security and its impact on E commerce
Cyber security and its impact on E commerceCyber security and its impact on E commerce
Cyber security and its impact on E commerce
 
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...
 
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdfGOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
 
Introduction Computer Science - Software Design.pdf
Introduction Computer Science - Software Design.pdfIntroduction Computer Science - Software Design.pdf
Introduction Computer Science - Software Design.pdf
 
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
 
How to Track Employee Performance A Comprehensive Guide.pdf
How to Track Employee Performance A Comprehensive Guide.pdfHow to Track Employee Performance A Comprehensive Guide.pdf
How to Track Employee Performance A Comprehensive Guide.pdf
 
Buds n Tech IT Solutions: Top-Notch Web Services in Noida
Buds n Tech IT Solutions: Top-Notch Web Services in NoidaBuds n Tech IT Solutions: Top-Notch Web Services in Noida
Buds n Tech IT Solutions: Top-Notch Web Services in Noida
 
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
 
Ahmed Motair CV April 2024 (Senior SW Developer)
Ahmed Motair CV April 2024 (Senior SW Developer)Ahmed Motair CV April 2024 (Senior SW Developer)
Ahmed Motair CV April 2024 (Senior SW Developer)
 
Cloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEECloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEE
 
Hot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort Service
Hot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort ServiceHot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort Service
Hot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort Service
 
Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024
 
Odoo 14 - eLearning Module In Odoo 14 Enterprise
Odoo 14 - eLearning Module In Odoo 14 EnterpriseOdoo 14 - eLearning Module In Odoo 14 Enterprise
Odoo 14 - eLearning Module In Odoo 14 Enterprise
 
A healthy diet for your Java application Devoxx France.pdf
A healthy diet for your Java application Devoxx France.pdfA healthy diet for your Java application Devoxx France.pdf
A healthy diet for your Java application Devoxx France.pdf
 

Continuous Delivery with Docker and Jenkins Job Builder