SlideShare a Scribd company logo
Docker & Jenkins Pipeline
Continuous Integration – Mark Waite
Mile High Agile 2018
The
Intersection
Accident
Problem
Accidents frequently happen
at intersections
The Software Integration Problem
Merge
Team 1
Team 2
Team 3
• Integration frequently fails
• Conflicting changes
• Misunderstood requirements
• Missed capabilities
• Larger integrations fail more
Integration surprises
• Frequently surprised
• That should have worked
• Works on my machine
• Why would anyone do that?
• That’s a feature, not a bug
• …
The
Intersection
Accident
Solution
Roundabouts have
fewer accidents and
less severe accidents
The Software Integration Solution
• Integrate frequently • Combine changes often
• Evaluate changes often
• Detect issues early
Merge
Team 1
Team 2
Team 3
Merge
Team 1
Team 2
Team 3
Merge
Team 1
Team 2
Team 3
Merge
Team 1
Team 2
Team 3
Merge
Team 1
Team 2
Team 3
Implementation: Meet the Red Team
• Goal: Deliver great software from a happy team
• Integrate
• Build
• Test
• Deliver
• Find failures sooner, faster
Red Team Uses Jenkins Pipeline
• Jenkins Continuous Integration
• Open source
• Full-featured
• Scalable
• Powerful
• Easy to configure
Red Team Demo – Jenkins Pipeline
• Red Team finds team level problems sooner
• Conflicts discovered earlier
• Missed requirements identified sooner
• Integration is less painful because it is more frequent
Meet Ms. Green and Mrs. Black
• Red team members
• Ms. Green
• Mrs. Black
• Find problems sooner
Merge
Ms. Green
Red Team
Mrs. Black
What if I could find
problems before merge?
Check Proposed Changes
• Detect conflicts before merge
• Run tests before code review
• Try Pipeline improvements
Merge
Ms. Green
Red Team
Mrs. Black
What if I could find
problems before merge?
Red Team Uses Jenkins Multi-branch Pipeline
• Multi-branch Pipeline
• Domain specific language (DSL)
• Developer defined and modified
• Stored with the source code
• Job per branch
• Jobs created automatically
• Jobs destroyed automatically
pipeline {
agent any
stages {
stage('Build') {
steps {
sh 'make package'
}
}
}
}
Multi-branch Jenkins Pipeline Demo
• Ms. Green and Mrs. Black finds problems sooner
• Private merge of proposed change
• Merge conflicts detected
• Tests run before code review
The
Unintended
Variation
Problem
Surprises aren’t always happy
This Photo by BlarSnow is licensed under CC BY-SA
Variation in Software Development
• Good: Intentional Variation
• Platform specific build
• Multi-platform tests
• Web browser tests
• Low bandwidth tests
This icon by Sean Martell is
licensed under CC BY-SA
Variation in Software Development
• Bad: Unintentional Variation
• Wrong build tools
• Outdated dependencies
• Contaminated tests
• Full file systems
Reducing Unintentional Variation with Docker
• Docker Containers
• Repeatable
• Isolated file system
• Isolated process - lightweight
• Open source
Building with Docker – Apache Maven
• Java 7, latest Maven 3
• docker run maven:3-jdk-7 mvn –v
• Java 8, latest Maven 3
• docker run maven:3-jdk-8 mvn –v
• Java 9, latest Maven 3
• docker run maven:3-jdk-9 mvn –v
• Java 10, latest Maven 3
• docker run maven:3-jdk-10 mvn -v
• Java 11, latest Maven 3
• docker run maven:3-jdk-11 mvn -v
See https://hub.docker.com/_/maven/ for more command line details
Building with Docker – Gradle
• Java 8, Gradle 4.7.0
• docker run gradle:4.7.0-jre8 gradle –-version
• Java 9, Gradle 4.7.0
• docker run gradle:4.7.0-jre9 gradle –-version
• Java 10, Gradle 4.7.0
• docker run gradle:4.7.0-jre10 gradle –-version
See https://hub.docker.com/_/gradle/ for more command line details
Define Your Own Toolchain
• Dockerfile specifies
• Operating system (CentOS, Debian, Red Hat, SUSE, Ubuntu, …)
• Packages
• File system contents
• Volume mount points (reuse, persistence across run, etc.)
Build with Docker
• Repeatable builds in precisely defined environment
• Specify exact tool versions in Dockerfile
• Clean file system is easy
• Examples
• I need gcc 6.1 and go 1.8, they need gcc 4.3 and java 1.8
• Both can be satisfied by each compiling from a purpose-built docker image
• I need specific library versions, they need different versions
• Both satisfied by their own Dockerfile
Docker for Unit and Integration Tests
Fewer environment surprises
Docker for Better Unit & Integration Testing
• Docker provides more consistent runtime
• Reduce differences between test environments
• Examples
• Unit tests run in Docker start from a clean state
• Test environment cleanup is simpler
Specific Example – Jenkins Test Harness
• Jenkins test harness uses a specific named temporary directory
• Multiple users on same machine cannot use same directory
• Docker file system isolation solves it
Docker for End to End Tests
Rapid configuration of complex scenarios
Docker for Better End to End Testing
• Docker automates complicated configuration
• Repeatable test environment creation
• Compose multi-component test configurations
• Spend less time configuring test environments
• Spend more time testing
• Examples:
• Jenkins LTS with plugins
• https://github.com/MarkEWaite/docker-lfs/tree/lts-with-plugins
Docker for Bug Reports
Repeatable environments in the bug report
Docker for Better Bug Reports
• Simplify long sequences of pre-conditions in Dockerfile
• Focus the report on specific bug details
• Simplify setup for bug fixer
• Some examples:
• JENKINS-41948 – noSuchMethodError in scanning
• JENKINS-42204 – NPE due to GitSCMSource change
• JENKINS-46724 – Illegal reflective access from remoting
Docker & Jenkins Together
• Jenkins for Pipeline as code
• Docker for infrastructure as code

More Related Content

PPTX
Docker and Jenkins Pipeline
PDF
Building Efficient Parallel Testing Platforms with Docker
PDF
DCSF19 Container Security: Theory & Practice at Netflix
PDF
Using Docker for Testing
PDF
Jenkins Reviewbot
PDF
Jenkins Pipeline Tutorial | Continuous Delivery Pipeline Using Jenkins | DevO...
PPTX
MyHeritage - End 2 End testing Infra
PPTX
Automated Deployment Pipeline using Jenkins, Puppet, Mcollective and AWS
Docker and Jenkins Pipeline
Building Efficient Parallel Testing Platforms with Docker
DCSF19 Container Security: Theory & Practice at Netflix
Using Docker for Testing
Jenkins Reviewbot
Jenkins Pipeline Tutorial | Continuous Delivery Pipeline Using Jenkins | DevO...
MyHeritage - End 2 End testing Infra
Automated Deployment Pipeline using Jenkins, Puppet, Mcollective and AWS

What's hot (20)

PPTX
Jenkins & scriptable build
PPTX
"Тестирование в Agile в среде виртуализации Vagrant+Docker", Владимир Сидорен...
KEY
Make It Cooler: Using Decentralized Version Control
PPTX
Ice breaker with dev ops
PDF
At Your Service: Using Jenkins in Operations
PDF
The Three Musketeers
PDF
How Nuxeo uses the open-source continuous integration server Jenkins
PPTX
Madrid Jam - continuous testing
PDF
From Virtual Machines to Containers
PPTX
Delivery Pipeline as Code: using Jenkins 2.0 Pipeline
PDF
Meet the Selenium Grid
PDF
Succesful Testing The Continuous Delivery Process
PDF
Pietro Di Bello, Paolo D'Incau - Continuous Delivery su progetti Java: cosa a...
PPTX
selenium grid & docker
PPT
Introduction to Git for developers
PPTX
MyHeritage - QA Automations in a Continuous Deployment environment
PDF
Jenkins vs. AWS CodePipeline (AWS User Group Berlin)
PPTX
Docker в автоматизации тестирования
PPTX
Continuous Integration - Mobile Practice
PDF
CI and CD Across the Enterprise with Jenkins (devops.com Nov 2014)
Jenkins & scriptable build
"Тестирование в Agile в среде виртуализации Vagrant+Docker", Владимир Сидорен...
Make It Cooler: Using Decentralized Version Control
Ice breaker with dev ops
At Your Service: Using Jenkins in Operations
The Three Musketeers
How Nuxeo uses the open-source continuous integration server Jenkins
Madrid Jam - continuous testing
From Virtual Machines to Containers
Delivery Pipeline as Code: using Jenkins 2.0 Pipeline
Meet the Selenium Grid
Succesful Testing The Continuous Delivery Process
Pietro Di Bello, Paolo D'Incau - Continuous Delivery su progetti Java: cosa a...
selenium grid & docker
Introduction to Git for developers
MyHeritage - QA Automations in a Continuous Deployment environment
Jenkins vs. AWS CodePipeline (AWS User Group Berlin)
Docker в автоматизации тестирования
Continuous Integration - Mobile Practice
CI and CD Across the Enterprise with Jenkins (devops.com Nov 2014)
Ad

Similar to MHA2018 - Docker and Jenkins Pipeline for Continuous integration - Mark Waite (20)

PDF
Efficient Parallel Testing with Docker
PPTX
Introduction to jenkins
PPTX
Test parallelization using Jenkins
PDF
Efficient Parallel Testing with Docker by Laura Frank
PPTX
CT Software Developers Meetup: Using Docker and Vagrant Within A GitHub Pull ...
PDF
Improving WordPress Development and Deployments with Docker
PPTX
Automated Testing with Docker on Steroids - nlOUG TechExperience 2018 (Amersf...
PPTX
Verifying your Ansible Roles using Docker, Test Kitchen and Serverspec
PPTX
Gradle 2.Write once, builde everywhere
PDF
Dockerizing Python Applications
PDF
Devops - why, what and how?
PPTX
Tuenti Release Workflow
PPTX
Jenkins an opensource CICD platform for all
PPTX
Performance Tuning in the Trenches
PDF
Docker & ci
PDF
ExpoQA 2017 Docker and CI
PPTX
ma-formation-en-Docker-jlklk,nknkjn.pptx
PDF
Vagrant for Effective DevOps Culture
PPTX
Continuous Integration as a Way of Life
PDF
JUC Europe 2015: From Virtual Machines to Containers: Achieving Continuous In...
Efficient Parallel Testing with Docker
Introduction to jenkins
Test parallelization using Jenkins
Efficient Parallel Testing with Docker by Laura Frank
CT Software Developers Meetup: Using Docker and Vagrant Within A GitHub Pull ...
Improving WordPress Development and Deployments with Docker
Automated Testing with Docker on Steroids - nlOUG TechExperience 2018 (Amersf...
Verifying your Ansible Roles using Docker, Test Kitchen and Serverspec
Gradle 2.Write once, builde everywhere
Dockerizing Python Applications
Devops - why, what and how?
Tuenti Release Workflow
Jenkins an opensource CICD platform for all
Performance Tuning in the Trenches
Docker & ci
ExpoQA 2017 Docker and CI
ma-formation-en-Docker-jlklk,nknkjn.pptx
Vagrant for Effective DevOps Culture
Continuous Integration as a Way of Life
JUC Europe 2015: From Virtual Machines to Containers: Achieving Continuous In...
Ad

More from AgileDenver (20)

PDF
MHA2018 - BDD is JIT - Jeff Langr
PDF
MHA2018 - How the Marine Corps Creates High-Performing Teams - Andrew McKnigh...
PDF
MHA2018 - Your Agile Adoption is Going to Fail (and you're gonna fall right o...
PDF
MHA2018 - 3 Minute Improv Games to Improve Your Teams - Wayde Stallmann
PPTX
MHA2018 - Rebuilding Trust through Transparency - Meg Ward
PDF
MHA2018 - The Experimentation Mindset - Doc Norton
PDF
MHA2018 - Only Responsible Leaders Can Collaborate in a High-Functioning Team...
PDF
MHA2018 - Herbie - understanding and applying WiP limits effectively - John Y...
PDF
MHA2018 - It's a "self-organizing" team -- how can I help them? - Erika Lenz
PDF
MHA2018 - Validate It Before You Build It: The Experiment Canvas - Brad Swanson
PDF
MHA2018 - How Agile Coaching Practices Can Be Used in Schools To Get Students...
PDF
MHA2018 - Going with the Flow: Adapting Scrum Practices for Marketing - Andre...
PPTX
MHA2018 - When will it be done - Probabilistic Predictions - Prateek Singh
PDF
MHA2018 - Jen Krieger - Getting Started with Kanban
PDF
MHA2018 - The Immunity to Change - How to discover individual or team resista...
PDF
MHA2018 - How Agile connects to the Social Nature of a High-Performance Workp...
PPTX
MHA2018 - Workbook Breaking Out of The Rut-rospective: Finding Activities to ...
PPTX
MHA2018 - Breaking Out of The Rut-rospective: Finding Activities to Engage Yo...
PPTX
MHA2018 - Introduction to Observational Coaching - Daniel Lynn
PDF
MHA2018 - Develop your Sense of Code Smell - Mike Clement
MHA2018 - BDD is JIT - Jeff Langr
MHA2018 - How the Marine Corps Creates High-Performing Teams - Andrew McKnigh...
MHA2018 - Your Agile Adoption is Going to Fail (and you're gonna fall right o...
MHA2018 - 3 Minute Improv Games to Improve Your Teams - Wayde Stallmann
MHA2018 - Rebuilding Trust through Transparency - Meg Ward
MHA2018 - The Experimentation Mindset - Doc Norton
MHA2018 - Only Responsible Leaders Can Collaborate in a High-Functioning Team...
MHA2018 - Herbie - understanding and applying WiP limits effectively - John Y...
MHA2018 - It's a "self-organizing" team -- how can I help them? - Erika Lenz
MHA2018 - Validate It Before You Build It: The Experiment Canvas - Brad Swanson
MHA2018 - How Agile Coaching Practices Can Be Used in Schools To Get Students...
MHA2018 - Going with the Flow: Adapting Scrum Practices for Marketing - Andre...
MHA2018 - When will it be done - Probabilistic Predictions - Prateek Singh
MHA2018 - Jen Krieger - Getting Started with Kanban
MHA2018 - The Immunity to Change - How to discover individual or team resista...
MHA2018 - How Agile connects to the Social Nature of a High-Performance Workp...
MHA2018 - Workbook Breaking Out of The Rut-rospective: Finding Activities to ...
MHA2018 - Breaking Out of The Rut-rospective: Finding Activities to Engage Yo...
MHA2018 - Introduction to Observational Coaching - Daniel Lynn
MHA2018 - Develop your Sense of Code Smell - Mike Clement

Recently uploaded (20)

PPTX
PHIL.-ASTRONOMY-AND-NAVIGATION of ..pptx
PPTX
Relationship Management Presentation In Banking.pptx
PDF
natwest.pdf company description and business model
PPTX
Primary and secondary sources, and history
PPTX
English-9-Q1-3-.pptxjkshbxnnxgchchxgxhxhx
PPTX
chapter8-180915055454bycuufucdghrwtrt.pptx
PPTX
Presentation for DGJV QMS (PQP)_12.03.2025.pptx
PDF
Swiggy’s Playbook: UX, Logistics & Monetization
PDF
Nykaa-Strategy-Case-Fixing-Retention-UX-and-D2C-Engagement (1).pdf
PDF
Instagram's Product Secrets Unveiled with this PPT
PPTX
Introduction-to-Food-Packaging-and-packaging -materials.pptx
PPTX
Tour Presentation Educational Activity.pptx
PPTX
Human Mind & its character Characteristics
PPTX
Hydrogel Based delivery Cancer Treatment
PPTX
_ISO_Presentation_ISO 9001 and 45001.pptx
PPTX
Emphasizing It's Not The End 08 06 2025.pptx
PPTX
fundraisepro pitch deck elegant and modern
PDF
Parts of Speech Prepositions Presentation in Colorful Cute Style_20250724_230...
DOCX
"Project Management: Ultimate Guide to Tools, Techniques, and Strategies (2025)"
PPTX
lesson6-211001025531lesson plan ppt.pptx
PHIL.-ASTRONOMY-AND-NAVIGATION of ..pptx
Relationship Management Presentation In Banking.pptx
natwest.pdf company description and business model
Primary and secondary sources, and history
English-9-Q1-3-.pptxjkshbxnnxgchchxgxhxhx
chapter8-180915055454bycuufucdghrwtrt.pptx
Presentation for DGJV QMS (PQP)_12.03.2025.pptx
Swiggy’s Playbook: UX, Logistics & Monetization
Nykaa-Strategy-Case-Fixing-Retention-UX-and-D2C-Engagement (1).pdf
Instagram's Product Secrets Unveiled with this PPT
Introduction-to-Food-Packaging-and-packaging -materials.pptx
Tour Presentation Educational Activity.pptx
Human Mind & its character Characteristics
Hydrogel Based delivery Cancer Treatment
_ISO_Presentation_ISO 9001 and 45001.pptx
Emphasizing It's Not The End 08 06 2025.pptx
fundraisepro pitch deck elegant and modern
Parts of Speech Prepositions Presentation in Colorful Cute Style_20250724_230...
"Project Management: Ultimate Guide to Tools, Techniques, and Strategies (2025)"
lesson6-211001025531lesson plan ppt.pptx

MHA2018 - Docker and Jenkins Pipeline for Continuous integration - Mark Waite

  • 1. Docker & Jenkins Pipeline Continuous Integration – Mark Waite Mile High Agile 2018
  • 3. The Software Integration Problem Merge Team 1 Team 2 Team 3 • Integration frequently fails • Conflicting changes • Misunderstood requirements • Missed capabilities • Larger integrations fail more
  • 4. Integration surprises • Frequently surprised • That should have worked • Works on my machine • Why would anyone do that? • That’s a feature, not a bug • …
  • 6. The Software Integration Solution • Integrate frequently • Combine changes often • Evaluate changes often • Detect issues early Merge Team 1 Team 2 Team 3 Merge Team 1 Team 2 Team 3 Merge Team 1 Team 2 Team 3 Merge Team 1 Team 2 Team 3 Merge Team 1 Team 2 Team 3
  • 7. Implementation: Meet the Red Team • Goal: Deliver great software from a happy team • Integrate • Build • Test • Deliver • Find failures sooner, faster
  • 8. Red Team Uses Jenkins Pipeline • Jenkins Continuous Integration • Open source • Full-featured • Scalable • Powerful • Easy to configure
  • 9. Red Team Demo – Jenkins Pipeline • Red Team finds team level problems sooner • Conflicts discovered earlier • Missed requirements identified sooner • Integration is less painful because it is more frequent
  • 10. Meet Ms. Green and Mrs. Black • Red team members • Ms. Green • Mrs. Black • Find problems sooner Merge Ms. Green Red Team Mrs. Black What if I could find problems before merge?
  • 11. Check Proposed Changes • Detect conflicts before merge • Run tests before code review • Try Pipeline improvements Merge Ms. Green Red Team Mrs. Black What if I could find problems before merge?
  • 12. Red Team Uses Jenkins Multi-branch Pipeline • Multi-branch Pipeline • Domain specific language (DSL) • Developer defined and modified • Stored with the source code • Job per branch • Jobs created automatically • Jobs destroyed automatically pipeline { agent any stages { stage('Build') { steps { sh 'make package' } } } }
  • 13. Multi-branch Jenkins Pipeline Demo • Ms. Green and Mrs. Black finds problems sooner • Private merge of proposed change • Merge conflicts detected • Tests run before code review
  • 14. The Unintended Variation Problem Surprises aren’t always happy This Photo by BlarSnow is licensed under CC BY-SA
  • 15. Variation in Software Development • Good: Intentional Variation • Platform specific build • Multi-platform tests • Web browser tests • Low bandwidth tests This icon by Sean Martell is licensed under CC BY-SA
  • 16. Variation in Software Development • Bad: Unintentional Variation • Wrong build tools • Outdated dependencies • Contaminated tests • Full file systems
  • 17. Reducing Unintentional Variation with Docker • Docker Containers • Repeatable • Isolated file system • Isolated process - lightweight • Open source
  • 18. Building with Docker – Apache Maven • Java 7, latest Maven 3 • docker run maven:3-jdk-7 mvn –v • Java 8, latest Maven 3 • docker run maven:3-jdk-8 mvn –v • Java 9, latest Maven 3 • docker run maven:3-jdk-9 mvn –v • Java 10, latest Maven 3 • docker run maven:3-jdk-10 mvn -v • Java 11, latest Maven 3 • docker run maven:3-jdk-11 mvn -v See https://hub.docker.com/_/maven/ for more command line details
  • 19. Building with Docker – Gradle • Java 8, Gradle 4.7.0 • docker run gradle:4.7.0-jre8 gradle –-version • Java 9, Gradle 4.7.0 • docker run gradle:4.7.0-jre9 gradle –-version • Java 10, Gradle 4.7.0 • docker run gradle:4.7.0-jre10 gradle –-version See https://hub.docker.com/_/gradle/ for more command line details
  • 20. Define Your Own Toolchain • Dockerfile specifies • Operating system (CentOS, Debian, Red Hat, SUSE, Ubuntu, …) • Packages • File system contents • Volume mount points (reuse, persistence across run, etc.)
  • 21. Build with Docker • Repeatable builds in precisely defined environment • Specify exact tool versions in Dockerfile • Clean file system is easy • Examples • I need gcc 6.1 and go 1.8, they need gcc 4.3 and java 1.8 • Both can be satisfied by each compiling from a purpose-built docker image • I need specific library versions, they need different versions • Both satisfied by their own Dockerfile
  • 22. Docker for Unit and Integration Tests Fewer environment surprises
  • 23. Docker for Better Unit & Integration Testing • Docker provides more consistent runtime • Reduce differences between test environments • Examples • Unit tests run in Docker start from a clean state • Test environment cleanup is simpler
  • 24. Specific Example – Jenkins Test Harness • Jenkins test harness uses a specific named temporary directory • Multiple users on same machine cannot use same directory • Docker file system isolation solves it
  • 25. Docker for End to End Tests Rapid configuration of complex scenarios
  • 26. Docker for Better End to End Testing • Docker automates complicated configuration • Repeatable test environment creation • Compose multi-component test configurations • Spend less time configuring test environments • Spend more time testing • Examples: • Jenkins LTS with plugins • https://github.com/MarkEWaite/docker-lfs/tree/lts-with-plugins
  • 27. Docker for Bug Reports Repeatable environments in the bug report
  • 28. Docker for Better Bug Reports • Simplify long sequences of pre-conditions in Dockerfile • Focus the report on specific bug details • Simplify setup for bug fixer • Some examples: • JENKINS-41948 – noSuchMethodError in scanning • JENKINS-42204 – NPE due to GitSCMSource change • JENKINS-46724 – Illegal reflective access from remoting
  • 29. Docker & Jenkins Together • Jenkins for Pipeline as code • Docker for infrastructure as code

Editor's Notes

  • #3: We’ve found through years of driving automobiles that accidents happen more frequently at intersections than on long straight stretches.
  • #5: Tell the story of the wooden trivet. Wooden trivet looks like it should assemble in either direction. Legs appear consistently sized, finish is consistent, and it looks reasonable Inverted parts do not assemble cleanly, no matter how much they look like they will.
  • #15: A birthday gift is an intentional surprise. We laugh and smile and enjoy the experience of being surprised by the contents of that beautifully wrapped package. The gift is a source of joy and fun
  • #16: Intentional variation in software development happens all the time. We develop for multiple platforms. We test on multiple platforms. We develop for multiple browsers. We test our mobile apps in low bandwidth environments. Those can all be good variations in software development. They help us create great software.
  • #17: Unfortunately, some variation can delay or derail software creation. When we build with the wrong tool, we may get the wrong results. When we use outdated dependencies, we may have bugs we did not expect. When unexpected files on a test system alter the behavior of the test, we may miss important bugs. When a build system or a test system runs out of space, we may waste time diagnosing irrelevant failures
  • #18: Describe a brief history of containers, Solaris and BSD as jails, then Linux with greater ease and more capabilities.