SlideShare a Scribd company logo
Pipeline as CodePipeline as Code
Kris Buytaert
@krisbuytaert
Kris BuytaertKris Buytaert
● I used to be a Dev,I used to be a Dev,
● Then Became an OpThen Became an Op
● CTO and Open Source ConsultantCTO and Open Source Consultant
@@inuits.euinuits.eu
● Everything is a freaking DNSEverything is a freaking DNS
ProblemProblem
● Evangelizing devopsEvangelizing devops
● Organiser of #devopsdays,Organiser of #devopsdays,
#cfgmgmtcamp, #loadays, ….#cfgmgmtcamp, #loadays, ….
cAmscAms
● Build AutomationBuild Automation
● Test AutomationTest Automation
● Infrastructure as CodeInfrastructure as Code
● Monitoring as CodeMonitoring as Code
● Security as CodeSecurity as Code
● Pipeline as CodePipeline as Code
Jenkins as ExampleJenkins as Example
•
Open Source toolOpen Source tool
•
Widely adopted in the EnterpriseWidely adopted in the Enterprise
•
Plenty of plugins availablePlenty of plugins available
•
UI FocusedUI Focused
PipelinesPipelines
● Lots of themLots of them
● Similar ones, but not identical onesSimilar ones, but not identical ones
● One project = different deploymentOne project = different deployment
targetstargets
● People move teams expect samePeople move teams expect same
patternspatterns
● Mostly unmaintanedMostly unmaintaned
Dirty ClickersDirty Clickers
Complex PipelinesComplex Pipelines
Scaling PipelinesScaling Pipelines
● Create a Pipeline,Create a Pipeline,
● For job in PipelineFor job in Pipeline
•
Create new Job Based on OldJobCreate new Job Based on OldJob
● Update One JobUpdate One Job
● Never refactor the restNever refactor the rest
Generating Jenkins PipelinesGenerating Jenkins Pipelines
● Template the XMLTemplate the XML
● Put it in PuppetPut it in Puppet
•
Worked for stable pipelinesWorked for stable pipelines
•
KindaKinda
● XML gets rewritten on the flyXML gets rewritten on the fly
JenkinsJobBuilderJenkinsJobBuilder
● First Usable AttemptFirst Usable Attempt
● Python BasedPython Based
● Openstack CommunityOpenstack Community
● Limited FunctionalityLimited Functionality
● Little Adoption / OpenstackLittle Adoption / Openstack
Abandonned itAbandonned it
PipelineDSLPipelineDSL
● JenkinsfileJenkinsfile
● Inside a repoInside a repo
● GroovyGroovy
● Limited functionalityLimited functionality
● Initially buggyInitially buggy
● Popular for Easy tasksPopular for Easy tasks
•
(straight, no splits etc)(straight, no splits etc)
Jenkins Job DSLJenkins Job DSL
● GroovyGroovy
● FlexibleFlexible
● Well SupportedWell Supported
● Suitable for more complex PipelinesSuitable for more complex Pipelines
SeedjobsSeedjobs
● GroovyGroovy
● GitGit
● Rebuild jobs onRebuild jobs on
commitcommit
● Projects inProjects in
foldersfolders
ExampleExample
Example dsl projectExample dsl project
job("${foldername}/dashing-dashboard-build")job("${foldername}/dashing-dashboard-build")
job("${foldername}/dashing-dashboard-test")job("${foldername}/dashing-dashboard-test")
job("${foldername}/dashing-upload2repo")job("${foldername}/dashing-upload2repo")
job("${foldername}/dashing-dashboard-job("${foldername}/dashing-dashboard-
deploy")deploy")
job("${foldername}/dashing-dashboard-job("${foldername}/dashing-dashboard-
deploy-prd")deploy-prd")
job("${foldername}/dashing-build")job("${foldername}/dashing-build")
Larger CI StacksLarger CI Stacks
● Generate Pipelines / Jobs based onGenerate Pipelines / Jobs based on
config files ,config files ,
● Build librariesBuild libraries
•
CheckoutJobCheckoutJob
•
DeployJobDeployJob
•
PackageJobPackageJob
● Use Groovy / JobDSL to generateUse Groovy / JobDSL to generate
PipelineDSLPipelineDSL
Other Tools :Other Tools :
Problems solvedProblems solved
● One job per task, no reuse of jobs withOne job per task, no reuse of jobs with
different parametersdifferent parameters
● All Jobs are in sync, update one =All Jobs are in sync, update one =
update allupdate all
● Centrally managed jobs (git)Centrally managed jobs (git)
Stop Clicking , Write CodeStop Clicking , Write Code
ContactContact
Kris BuytaertKris Buytaert Kris.Buytaert@inuits.beKris.Buytaert@inuits.be
Further ReadingFurther Reading
@krisbuytaert@krisbuytaert
http://www.krisbuytaert.be/blog/http://www.krisbuytaert.be/blog/
http://www.inuits.be/http://www.inuits.be/
InuitsInuits
EssensteenwegEssensteenweg
3131
BrasschaatBrasschaat
BelgiumBelgium
891.514.231891.514.231

More Related Content

ODP
Is there a future for devops ?
PDF
Moby is killing your devops efforts
ODP
Deploying your SaaS stack OnPrem
PDF
Pipeline as code for your infrastructure as Code
ODP
Automating MySQL operations with Puppet
ODP
From devoops to devops
PDF
Devops is dead, Long Live Devops
PDF
Docker is killing your #devops Efforts
Is there a future for devops ?
Moby is killing your devops efforts
Deploying your SaaS stack OnPrem
Pipeline as code for your infrastructure as Code
Automating MySQL operations with Puppet
From devoops to devops
Devops is dead, Long Live Devops
Docker is killing your #devops Efforts

What's hot (20)

PDF
The Return of the Dull Stack Engineer
ODP
Repositories as Code
ODP
Nightmare on Docker street
PDF
Dev secops opsec, devsec, devops ?
ODP
Devopsdays Amsterdam 2017 Keynote, looking back at 5 years of AMS
ODP
The influence of "Distributed platforms" on #devops
PDF
Devops is a Security Requirement
ODP
On the Importance of Infrastructure as Code
PDF
Groovy there's a docker in my application pipeline
PDF
Closing the gap between Distros(devs) and their Users(ops)
ODP
From MonitoringSucks to Monitoring Love , 2016 Edition
ODP
Continous Delivery of your Infrastructure
ODP
devops is a reorg
ODP
Looking back at 7.5 years of Devopsdays , DOd PDX
ODP
Another 7 tools for your #devops stack
PDF
Continuous Infrastructure First
PDF
No, we can't do continuous delivery
PDF
Dod is not done
PDF
Open Source Monitoring in 2019
ODP
Looking back at 5 years of #cfgmgmtcamp
The Return of the Dull Stack Engineer
Repositories as Code
Nightmare on Docker street
Dev secops opsec, devsec, devops ?
Devopsdays Amsterdam 2017 Keynote, looking back at 5 years of AMS
The influence of "Distributed platforms" on #devops
Devops is a Security Requirement
On the Importance of Infrastructure as Code
Groovy there's a docker in my application pipeline
Closing the gap between Distros(devs) and their Users(ops)
From MonitoringSucks to Monitoring Love , 2016 Edition
Continous Delivery of your Infrastructure
devops is a reorg
Looking back at 7.5 years of Devopsdays , DOd PDX
Another 7 tools for your #devops stack
Continuous Infrastructure First
No, we can't do continuous delivery
Dod is not done
Open Source Monitoring in 2019
Looking back at 5 years of #cfgmgmtcamp
Ad

Similar to Pipeline as Code (20)

PPTX
Pipeline as code - new feature in Jenkins 2
PDF
vodQA Pune (2019) - Jenkins pipeline As code
PDF
Codifying the Build and Release Process with a Jenkins Pipeline Shared Library
PDF
Jenkins : Pipeline As Code
PPTX
Jenkins pipeline as code
PPTX
Jenkins2 - Coding Continuous Delivery Pipelines
PDF
Jenkins Pipelines
PDF
Jenkins & IaC
PDF
Brujug Jenkins pipeline scalability
ODP
Continuous Delivery of (y)our infrastructure.
PDF
Pipeline 101 Lorelei Mccollum
PDF
Implementing CI CD UiPath Using Jenkins Plugin
PPTX
CICD with Jenkins
PPTX
DevOps-CI_CD_JAVA_JAVA______Jenkins.pptx
PDF
(Declarative) Jenkins Pipelines
PPTX
Pipeline as code using Jenkins -Ministry of Testing
PDF
Pipeline as Code Continuous Delivery with Jenkins Kubernetes and Terraform 1s...
PDF
PDF
Jenkins: An open-source automation server powering CI/CD Automation
PPTX
The Key Components of Adopting CI The OpenStack Way
Pipeline as code - new feature in Jenkins 2
vodQA Pune (2019) - Jenkins pipeline As code
Codifying the Build and Release Process with a Jenkins Pipeline Shared Library
Jenkins : Pipeline As Code
Jenkins pipeline as code
Jenkins2 - Coding Continuous Delivery Pipelines
Jenkins Pipelines
Jenkins & IaC
Brujug Jenkins pipeline scalability
Continuous Delivery of (y)our infrastructure.
Pipeline 101 Lorelei Mccollum
Implementing CI CD UiPath Using Jenkins Plugin
CICD with Jenkins
DevOps-CI_CD_JAVA_JAVA______Jenkins.pptx
(Declarative) Jenkins Pipelines
Pipeline as code using Jenkins -Ministry of Testing
Pipeline as Code Continuous Delivery with Jenkins Kubernetes and Terraform 1s...
Jenkins: An open-source automation server powering CI/CD Automation
The Key Components of Adopting CI The OpenStack Way
Ad

More from Kris Buytaert (16)

PDF
Years of (not) learning , from devops to devoops
PDF
Observability will not fix your Broken Monitoring ,Ignite
PDF
Infrastructure as Code Patterns
PDF
From devoops to devops 13 years of (not) learning
PDF
Pipeline all the Dashboards as Code
PDF
Help , My Datacenter is on fire
PDF
GitOps , done Right
PDF
Devops is Dead, Long live Devops
PDF
10 years of #devopsdays, but what have we really learned ?
PDF
Is there a Future for devops ?
PDF
10 Years of #devopsdays weirdness
PDF
ADDO 2019: Looking back at over 10 years of Devops
PDF
Can we fix dev-oops ?
PDF
Continuous Infrastructure First Ignite Edition
PDF
Continuous Infrastructure First
PDF
Migrating to Puppet 5
Years of (not) learning , from devops to devoops
Observability will not fix your Broken Monitoring ,Ignite
Infrastructure as Code Patterns
From devoops to devops 13 years of (not) learning
Pipeline all the Dashboards as Code
Help , My Datacenter is on fire
GitOps , done Right
Devops is Dead, Long live Devops
10 years of #devopsdays, but what have we really learned ?
Is there a Future for devops ?
10 Years of #devopsdays weirdness
ADDO 2019: Looking back at over 10 years of Devops
Can we fix dev-oops ?
Continuous Infrastructure First Ignite Edition
Continuous Infrastructure First
Migrating to Puppet 5

Recently uploaded (20)

PDF
Addressing The Cult of Project Management Tools-Why Disconnected Work is Hold...
PDF
System and Network Administration Chapter 2
PDF
Design an Analysis of Algorithms I-SECS-1021-03
PDF
SAP S4 Hana Brochure 3 (PTS SYSTEMS AND SOLUTIONS)
PDF
Raksha Bandhan Grocery Pricing Trends in India 2025.pdf
PDF
Internet Downloader Manager (IDM) Crack 6.42 Build 42 Updates Latest 2025
PPTX
Odoo POS Development Services by CandidRoot Solutions
PDF
System and Network Administraation Chapter 3
PDF
PTS Company Brochure 2025 (1).pdf.......
PDF
Design an Analysis of Algorithms II-SECS-1021-03
PDF
Audit Checklist Design Aligning with ISO, IATF, and Industry Standards — Omne...
PDF
Internet Downloader Manager (IDM) Crack 6.42 Build 41
PPTX
history of c programming in notes for students .pptx
PPTX
ai tools demonstartion for schools and inter college
PDF
Flood Susceptibility Mapping Using Image-Based 2D-CNN Deep Learnin. Overview ...
PPTX
Operating system designcfffgfgggggggvggggggggg
PPTX
Lecture 3: Operating Systems Introduction to Computer Hardware Systems
PPTX
Introduction to Artificial Intelligence
PDF
Why TechBuilder is the Future of Pickup and Delivery App Development (1).pdf
PPTX
Oracle E-Business Suite: A Comprehensive Guide for Modern Enterprises
Addressing The Cult of Project Management Tools-Why Disconnected Work is Hold...
System and Network Administration Chapter 2
Design an Analysis of Algorithms I-SECS-1021-03
SAP S4 Hana Brochure 3 (PTS SYSTEMS AND SOLUTIONS)
Raksha Bandhan Grocery Pricing Trends in India 2025.pdf
Internet Downloader Manager (IDM) Crack 6.42 Build 42 Updates Latest 2025
Odoo POS Development Services by CandidRoot Solutions
System and Network Administraation Chapter 3
PTS Company Brochure 2025 (1).pdf.......
Design an Analysis of Algorithms II-SECS-1021-03
Audit Checklist Design Aligning with ISO, IATF, and Industry Standards — Omne...
Internet Downloader Manager (IDM) Crack 6.42 Build 41
history of c programming in notes for students .pptx
ai tools demonstartion for schools and inter college
Flood Susceptibility Mapping Using Image-Based 2D-CNN Deep Learnin. Overview ...
Operating system designcfffgfgggggggvggggggggg
Lecture 3: Operating Systems Introduction to Computer Hardware Systems
Introduction to Artificial Intelligence
Why TechBuilder is the Future of Pickup and Delivery App Development (1).pdf
Oracle E-Business Suite: A Comprehensive Guide for Modern Enterprises

Pipeline as Code

  • 1. Pipeline as CodePipeline as Code Kris Buytaert @krisbuytaert
  • 2. Kris BuytaertKris Buytaert ● I used to be a Dev,I used to be a Dev, ● Then Became an OpThen Became an Op ● CTO and Open Source ConsultantCTO and Open Source Consultant @@inuits.euinuits.eu ● Everything is a freaking DNSEverything is a freaking DNS ProblemProblem ● Evangelizing devopsEvangelizing devops ● Organiser of #devopsdays,Organiser of #devopsdays, #cfgmgmtcamp, #loadays, ….#cfgmgmtcamp, #loadays, ….
  • 3. cAmscAms ● Build AutomationBuild Automation ● Test AutomationTest Automation ● Infrastructure as CodeInfrastructure as Code ● Monitoring as CodeMonitoring as Code ● Security as CodeSecurity as Code ● Pipeline as CodePipeline as Code
  • 4. Jenkins as ExampleJenkins as Example • Open Source toolOpen Source tool • Widely adopted in the EnterpriseWidely adopted in the Enterprise • Plenty of plugins availablePlenty of plugins available • UI FocusedUI Focused
  • 5. PipelinesPipelines ● Lots of themLots of them ● Similar ones, but not identical onesSimilar ones, but not identical ones ● One project = different deploymentOne project = different deployment targetstargets ● People move teams expect samePeople move teams expect same patternspatterns ● Mostly unmaintanedMostly unmaintaned
  • 8. Scaling PipelinesScaling Pipelines ● Create a Pipeline,Create a Pipeline, ● For job in PipelineFor job in Pipeline • Create new Job Based on OldJobCreate new Job Based on OldJob ● Update One JobUpdate One Job ● Never refactor the restNever refactor the rest
  • 9. Generating Jenkins PipelinesGenerating Jenkins Pipelines ● Template the XMLTemplate the XML ● Put it in PuppetPut it in Puppet • Worked for stable pipelinesWorked for stable pipelines • KindaKinda ● XML gets rewritten on the flyXML gets rewritten on the fly
  • 10. JenkinsJobBuilderJenkinsJobBuilder ● First Usable AttemptFirst Usable Attempt ● Python BasedPython Based ● Openstack CommunityOpenstack Community ● Limited FunctionalityLimited Functionality ● Little Adoption / OpenstackLittle Adoption / Openstack Abandonned itAbandonned it
  • 11. PipelineDSLPipelineDSL ● JenkinsfileJenkinsfile ● Inside a repoInside a repo ● GroovyGroovy ● Limited functionalityLimited functionality ● Initially buggyInitially buggy ● Popular for Easy tasksPopular for Easy tasks • (straight, no splits etc)(straight, no splits etc)
  • 12. Jenkins Job DSLJenkins Job DSL ● GroovyGroovy ● FlexibleFlexible ● Well SupportedWell Supported ● Suitable for more complex PipelinesSuitable for more complex Pipelines
  • 13. SeedjobsSeedjobs ● GroovyGroovy ● GitGit ● Rebuild jobs onRebuild jobs on commitcommit ● Projects inProjects in foldersfolders
  • 15. Example dsl projectExample dsl project job("${foldername}/dashing-dashboard-build")job("${foldername}/dashing-dashboard-build") job("${foldername}/dashing-dashboard-test")job("${foldername}/dashing-dashboard-test") job("${foldername}/dashing-upload2repo")job("${foldername}/dashing-upload2repo") job("${foldername}/dashing-dashboard-job("${foldername}/dashing-dashboard- deploy")deploy") job("${foldername}/dashing-dashboard-job("${foldername}/dashing-dashboard- deploy-prd")deploy-prd") job("${foldername}/dashing-build")job("${foldername}/dashing-build")
  • 16. Larger CI StacksLarger CI Stacks ● Generate Pipelines / Jobs based onGenerate Pipelines / Jobs based on config files ,config files , ● Build librariesBuild libraries • CheckoutJobCheckoutJob • DeployJobDeployJob • PackageJobPackageJob ● Use Groovy / JobDSL to generateUse Groovy / JobDSL to generate PipelineDSLPipelineDSL
  • 18. Problems solvedProblems solved ● One job per task, no reuse of jobs withOne job per task, no reuse of jobs with different parametersdifferent parameters ● All Jobs are in sync, update one =All Jobs are in sync, update one = update allupdate all ● Centrally managed jobs (git)Centrally managed jobs (git)
  • 19. Stop Clicking , Write CodeStop Clicking , Write Code
  • 20. ContactContact Kris BuytaertKris Buytaert Kris.Buytaert@inuits.beKris.Buytaert@inuits.be Further ReadingFurther Reading @krisbuytaert@krisbuytaert http://www.krisbuytaert.be/blog/http://www.krisbuytaert.be/blog/ http://www.inuits.be/http://www.inuits.be/ InuitsInuits EssensteenwegEssensteenweg 3131 BrasschaatBrasschaat BelgiumBelgium 891.514.231891.514.231