SlideShare ist ein Scribd-Unternehmen logo
1 von 51
Downloaden Sie, um offline zu lesen
GETTING OUT OF THE JOB JUNGLE
@DamienCoraboeuf
WHO AM I?
▸ Damien Coraboeuf (@DamienCoraboeuf)
▸ Born to Java in 1996
▸ Working in Continuous Delivery since 2008
▸ Automating pipelines @ FIS
I’ll be your guide on this journey
THE MAP Short introduction to Jenkins
Birth of a pipeline
Manual mode
The Job DSL
Branching and its consequences
Pipeline as code
Pipeline as not code
Automation of automation
We want to get there
Look, there is another

beach here!
Do not go there!
💀
There are traps here!
💀
DO YOU KNOW WHO THIS IS?
JENKINS
▸ http://jenkins-ci.org/
▸ Very versatile Continuous Integration engine
▸ ~ 70% of the CI market (2012 figures)
▸ Open source - strong community
▸ Extensible
▸ more than 1000 plugins
▸ easy to develop new ones
▸ Integrates with basically everything
▸ Job scheduler
JENKINS - JOBS & FOLDERS
JENKINS - JOB CONFIGURATION
Let’s get some sources…
Let’s run some build…
Let’s trigger another job…
PIPELINES
▸ Defining jobs
▸ Linking them together
▸ Running them in parallel or in sequence
▸ Some triggers are automatic, other ones are manual
BUILD
DEPLOY ENV 1
DEPLOY ENV 2
DEPLOY ENV 3
PUBLICATION RELEASE
A PIPELINE IS BORN
BUILD
DEPLOY ENV 1
DEPLOY ENV 2
DEPLOY ENV 3
PUBLICATION RELEASE
BUILD
DEPLOY ENV 1
DEPLOY ENV 2
DEPLOY ENV 3
PUBLICATION RELEASE
BUILD
DEPLOY ENV 1
DEPLOY ENV 2
DEPLOY ENV 3
PUBLICATION RELEASE
Commit 1
Commit 2
Commit 3
SO FAR SO GOOD
“Look Ma, I’ve built a pipeline!”
“Lovely. Now, build one for your sister.”
THE STORY
Product A
Product B
Project C
Maintenance 11.8
Maintenance 11.9
Maintenance 11.10
Maintenance 7.2
Maintenance 8.0
Maintenance 5.0
Check
Publication
WAS JBoss …
Promotion for QA
QAWAS QAJBoss …
Promotion for NFT
Sonar Fortify Perf
Promotion for delivery
Delivery
Auto Manual
Pipeline
Products & Projects Branches
…
THE STORY
Jenkins team
> 5000 jobs and growing…
In order to scale, we want:
✔ Self service
✔ Security
✔ Simplicity
✔ Extensibility
“What are we?”
“Developers!”
“What do we do?”
“Code!”
“Why do we do it?”
“Automation!”
JOB DSL PLUGIN - START OF THE JOURNEY OUT OF THE JUNGLE
▸ Define a job using a Groovy based DSL!
JOB DSL PLUGIN
▸ Very well supported
▸ Very good documentation
▸ Supports most of the plugins
▸ Built-in extensibility: inline or DSL extensions
JOB DSL PLUGIN
▸ Folders & views
▸ … automatic triggers upon generation
▸ … using files in workspace
JOB DSL PLUG-IN
▸ This remains code…
JOB DSL PLUGIN - SEED JOB
▸ DSL based generation done from a job
▸ Can generate and/or update other jobs
▸ Can even run while jobs are running :)
SEED JOB GENERATED JOB(S)
DSL SCRIPT
Generates
Accesses (SCM or inline)
GENERATED JOB(S)
GENERATED JOB(S)
PIPELINE EVOLUTION
▸ One Seed DSL job is all very good but…
▸ Pipeline evolves with the code
Builds

this code
Builds

this code
W
ill fail for this code
New platform being

added
Job for the

new platform
BRANCHING
▸ One Seed DSL job is all very good but…
▸ Different pipelines for different
branches
develop
release/2.0
Pipelines for releases

might be more complex
Release job
PIPELINE VERSIONS
▸ Where do we put the DSL script?
develop
release/2.0
Pipelines for releases

might be more complex
DSL.GROOVY
DSL.GROOVY
DSL.GROOVY
PIPELINE AS CODE
▸ Your pipeline is linked to the code it builds
▸ Define your pipeline in your code
Project
src
pom.xml
job-dsl-script.groovy
PIPELINE CODE DUPLICATION
▸ We can now generate a pipeline for any branch, any commit







▸ It evolves with your branches and is merged like any other piece of code
▸ That’s good enough for 1 project
▸ With several (many) projects, the level of DSL code duplication explodes!
DEVELOP FEATURE/BIG RELEASE/1.0
DSL SCRIPT DSL SCRIPT DSL SCRIPT
DEVELOP FEATURE/BIG RELEASE/1.0
DSL SCRIPT DSL SCRIPT DSL SCRIPT
DEVELOP FEATURE/BIG RELEASE/1.0
DSL SCRIPT DSL SCRIPT DSL SCRIPT
DEVELOP FEATURE/BIG RELEASE/1.0
DSL SCRIPT DSL SCRIPT DSL SCRIPT
DEVELOP FEATURE/BIG RELEASE/1.0
DSL SCRIPT DSL SCRIPT DSL SCRIPT
PIPELINE CODE DUPLICATION
▸ Job DSL code duplication has the same issues than
production code duplication
DEVELOP FEATURE/BIG RELEASE/1.0
DSL SCRIPT DSL SCRIPT DSL SCRIPT
DEVELOP FEATURE/BIG RELEASE/1.0
DSL SCRIPT DSL SCRIPT DSL SCRIPT
DEVELOP FEATURE/BIG RELEASE/1.0
DSL SCRIPT DSL SCRIPT DSL SCRIPT
DEVELOP FEATURE/BIG RELEASE/1.0
DSL SCRIPT DSL SCRIPT DSL SCRIPT
✘ ✘ ✘ ✘ ✘ ✘
✘✘✘✘✘✘
DEVELOP FEATURE/BIG RELEASE/1.0
DSL SCRIPT DSL SCRIPT DSL SCRIPT
DEVELOP FEATURE/BIG RELEASE/1.0
DSL SCRIPT DSL SCRIPT DSL SCRIPT
✘✘✘✘✘✘
DEVELOP FEATURE/BIG RELEASE/1.0
DSL SCRIPT DSL SCRIPT DSL SCRIPT
DEVELOP FEATURE/BIG RELEASE/1.0
DSL SCRIPT DSL SCRIPT DSL SCRIPT
✘✘✘✘✘✘
DEVELOP
DSL SCRIPT
DEVELOP
DSL SCRIPT
✘
✘
DEVELOP
DSL SCRIPT
✘
DEVELOP
DSL SCRIPT
✘
LEASE/1.0
L SCRIPT
LEASE/1.0
L SCRIPT
LEASE/1.0
L SCRIPT
LEASE/1.0
L SCRIPT
DEVELOP FEATURE/BIG RELEASE/1.0 DEVELOP FEATURE/BIG RELEASE/1.0 DEVELOPLEASE/1.0
PIPELINE LIBRARIES TO THE RESCUE
▸ Pipeline is code
▸ Reuse of code through versioned libraries
DEVELOP FEATURE/BIG RELEASE/1.0
DSL SCRIPT DSL SCRIPT DSL SCRIPT
PIPELINE DSL LIBRARY
1.1 1.0
Normal project

Can be tested

Can be released
PIPELINE DSL LIBRARY B
PIPELINE LIBRARIES TO THE RESCUE
▸ DSL libraries as code libraries
DEVELOP FEATURE/BIG DEVELOP
DSL SCRIPT DSL SCRIPT DSL SCRIPT
PIPELINE DSL LIBRARY A
1.1 1.0
COMMON DSL LIBRARY
1.0
Dependencies
2.0
ARE WE DONE?
▸ We can describe a pipeline using a DSL
▸ The pipeline is defined together with the code it builds
▸ The DSL can use libraries to reduce code duplication
?
NOT QUITE…
▸ This is not enough to really scale
▸ We still have to write some DSL
▸ Self service ✔
▸ Security ✘
▸ Simplicity ✘
▸ Extensibility ✔
PIPELINE AS “NOT CODE”
▸ Let’s describe the pipeline using a properties file
▸ Which pipeline library & which version
▸ Configuration properties - specific to the library
▸ Property file format ubiquitous
▸ No code running on the master
▸ Can be used for reporting on all the pipelines!
PIPELINE AS PROPERTIES
seed.properties
PIPELINE AS… PROPERTIES
SEED JOB
SCM Repository
Jobs
Gets the

seed.properties
Gets the pipeline

library version
Configures and runs

the pipeline library
PIPELINE AS… PROPERTIES
SEED JOB
PIPELINE AS… METADATA
▸ The seed.properties files provide a wonderful way to
do reporting on all projects and branches
DEVELOP FEATURE/BIG RELEASE/1.0
SEED SEED SEED
DEVELOP FEATURE/NEW RELEASE/3.4
SEED SEED SEED
seed.properties seed.properties
“Give me all branches using JDK 6”

“Give me all projects having no SonarQube scan”

“…”
SEED PLUGIN
▸ https://github.com/jenkinsci/seed-plugin
▸ Allows to generate:
▸ projects folders
▸ branches pipelines
▸ based on seed files (properties and/or DSL)
▸ integration with hooks
SEVERAL INTEGRATION MODES
SEED.PROPERTIES
SEED PLUGIN
SEED.PROPERTIES
SEED.GROOVYSEED.GROOVY
PIPELINE LIBRARY PIPELINE LIBRARY
BRANCH PIPELINE
95% 4%
1%
GENERATION STRUCTURE
SEED
PROJECT GENERATOR
PROJECT FOLDER
BOOTSTRAPPING
BRANCH GENERATOR
BRANCH FOLDER
BRANCH JOB 1
BRANCH JOB 2
BRANCH JOB 3
BRANCH JOB 4
GENERATION
Project teamJenkins team
PIPELINE SECURITY
SEED
A FOLDER
A GENERATOR
BOOTSTRAPPING
A team
Jenkins team
B team
GENERATION
A BRANCHES
A PIPELINES
B FOLDER
B GENERATOR
B BRANCHES
B PIPELINES
GENERATION - HOW IT LOOKS LIKE
BOOTSTRAPPING
GENERATION
GENERATION
AUTOMATION
HOOKS
▸ Generations can be automated using hooks at SCM level
▸ Support for GitHub, BitBucket, generic HTTP calls (for SVN)
▸ Configurable. For example:
BRANCH CREATION
SCM EVENT
Seed plug-in
COMMIT
SEED CHANGED
BRANCH DELETION
PIPELINE EVENT
Generation
Triggers the pipeline
Regenerates the pipeline
Deletes the pipeline
RESPONSIBILITIES
Jenkins team
Pipeline libraries
Develops and
maintains
Development team
Seed files
Defines
Seed plug-in
SCM
Triggers
WHAT DID WE JUST ACHIEVE?
▸ Automation of automation
▸ Self service ✔
▸ Pipeline automation from SCM
▸ Security ✔
▸ Project level authorisations
▸ No code on the master
▸ Simplicity ✔
▸ Property files
▸ Extensibility ✔
▸ Pipeline libraries
▸ Direct job DSL still possible
OUT OF THE JUNGLE…
SEED & PIPELINE PLUGIN
▸ The Seed plugin will keep working
▸ It can already generate pipeline jobs (Job DSL)
▸ But overlap of functionalities
Branch pipelines
Pipeline as code
SEED
PIPELINE
Hook integration
Pipeline as properties
Community & support
Pipeline libraries
Pipeline script library
SEED IN PIPELINE PLUGIN
▸ The Seed plugin as extension of the Pipeline plugin
Branch pipelines
Pipeline as code
SEED
PIPELINE
Hook integrationPipeline as properties
Community & support
Pipeline libraries
Pipeline script library
THANKS YOU!
Thanks to: Contact:
▸ http://nemerosa.com
▸ @DamienCoraboeuf
Getting out of the Job Jungle with Jenkins
Getting out of the Job Jungle with Jenkins

Weitere ähnliche Inhalte

Was ist angesagt?

Was ist angesagt? (20)

[RHFSeoul2017]6 Steps to Transform Enterprise Applications
[RHFSeoul2017]6 Steps to Transform Enterprise Applications[RHFSeoul2017]6 Steps to Transform Enterprise Applications
[RHFSeoul2017]6 Steps to Transform Enterprise Applications
 
At Your Service: Using Jenkins in Operations
At Your Service: Using Jenkins in OperationsAt Your Service: Using Jenkins in Operations
At Your Service: Using Jenkins in Operations
 
JUC Europe 2015: Scaling Your Jenkins Master with Docker
JUC Europe 2015: Scaling Your Jenkins Master with DockerJUC Europe 2015: Scaling Your Jenkins Master with Docker
JUC Europe 2015: Scaling Your Jenkins Master with Docker
 
Analyze This! CloudBees Jenkins Cluster Operations and Analytics
Analyze This! CloudBees Jenkins Cluster Operations and AnalyticsAnalyze This! CloudBees Jenkins Cluster Operations and Analytics
Analyze This! CloudBees Jenkins Cluster Operations and Analytics
 
JavaCro'14 - Continuous delivery of Java EE applications with Jenkins and Doc...
JavaCro'14 - Continuous delivery of Java EE applications with Jenkins and Doc...JavaCro'14 - Continuous delivery of Java EE applications with Jenkins and Doc...
JavaCro'14 - Continuous delivery of Java EE applications with Jenkins and Doc...
 
JUC Europe 2015: Scaling of Jenkins Pipeline Creation and Maintenance
JUC Europe 2015: Scaling of Jenkins Pipeline Creation and MaintenanceJUC Europe 2015: Scaling of Jenkins Pipeline Creation and Maintenance
JUC Europe 2015: Scaling of Jenkins Pipeline Creation and Maintenance
 
Building Jenkins Pipelines at Scale
Building Jenkins Pipelines at ScaleBuilding Jenkins Pipelines at Scale
Building Jenkins Pipelines at Scale
 
DevOps and Continuous Delivery reference architectures for Docker
DevOps and Continuous Delivery reference architectures for DockerDevOps and Continuous Delivery reference architectures for Docker
DevOps and Continuous Delivery reference architectures for Docker
 
Git and GitHub for Documentation
Git and GitHub for DocumentationGit and GitHub for Documentation
Git and GitHub for Documentation
 
Jenkins talk at Silicon valley DevOps meetup
Jenkins talk at Silicon valley DevOps meetupJenkins talk at Silicon valley DevOps meetup
Jenkins talk at Silicon valley DevOps meetup
 
7 Habits of Highly Effective Jenkins Users
7 Habits of Highly Effective Jenkins Users7 Habits of Highly Effective Jenkins Users
7 Habits of Highly Effective Jenkins Users
 
Improve your Java Environment with Docker
Improve your Java Environment with DockerImprove your Java Environment with Docker
Improve your Java Environment with Docker
 
Codecoon - A technical Case Study
Codecoon - A technical Case StudyCodecoon - A technical Case Study
Codecoon - A technical Case Study
 
Jenkins in the real world - DevOpsCon 2017
Jenkins in the real world - DevOpsCon 2017Jenkins in the real world - DevOpsCon 2017
Jenkins in the real world - DevOpsCon 2017
 
Using Docker for Testing
Using Docker for TestingUsing Docker for Testing
Using Docker for Testing
 
Jenkins Reviewbot
Jenkins ReviewbotJenkins Reviewbot
Jenkins Reviewbot
 
JUC Europe 2015: Continuous Integration and Distribution in the Cloud with DE...
JUC Europe 2015: Continuous Integration and Distribution in the Cloud with DE...JUC Europe 2015: Continuous Integration and Distribution in the Cloud with DE...
JUC Europe 2015: Continuous Integration and Distribution in the Cloud with DE...
 
Docker for Integration Testing
Docker for Integration TestingDocker for Integration Testing
Docker for Integration Testing
 
Let’s start Continuous Integration with jenkins
Let’s start Continuous Integration with jenkinsLet’s start Continuous Integration with jenkins
Let’s start Continuous Integration with jenkins
 
Michigan IT Symposium 2017 - CI/CD Workflow Tutorial
Michigan IT Symposium 2017 - CI/CD Workflow TutorialMichigan IT Symposium 2017 - CI/CD Workflow Tutorial
Michigan IT Symposium 2017 - CI/CD Workflow Tutorial
 

Ähnlich wie Getting out of the Job Jungle with Jenkins

Deploying Windows Containers with Draft, Helm and Kubernetes
Deploying Windows Containers with Draft, Helm and KubernetesDeploying Windows Containers with Draft, Helm and Kubernetes
Deploying Windows Containers with Draft, Helm and Kubernetes
Jessica Deen
 
Deploy made easy (even on Friday)
Deploy made easy (even on Friday)Deploy made easy (even on Friday)
Deploy made easy (even on Friday)
Riccardo Bini
 

Ähnlich wie Getting out of the Job Jungle with Jenkins (20)

Brujug Jenkins pipeline scalability
Brujug Jenkins pipeline scalabilityBrujug Jenkins pipeline scalability
Brujug Jenkins pipeline scalability
 
Belgium jenkins-meetup-job-jungle-0.1
Belgium jenkins-meetup-job-jungle-0.1Belgium jenkins-meetup-job-jungle-0.1
Belgium jenkins-meetup-job-jungle-0.1
 
VCS for Teamwork - GIT Workshop
VCS for Teamwork - GIT WorkshopVCS for Teamwork - GIT Workshop
VCS for Teamwork - GIT Workshop
 
Javaone - Gradle: Harder, Better, Stronger, Faster
Javaone - Gradle: Harder, Better, Stronger, Faster Javaone - Gradle: Harder, Better, Stronger, Faster
Javaone - Gradle: Harder, Better, Stronger, Faster
 
Chef vs Puppet vs Ansible vs SaltStack | Configuration Management Tools Compa...
Chef vs Puppet vs Ansible vs SaltStack | Configuration Management Tools Compa...Chef vs Puppet vs Ansible vs SaltStack | Configuration Management Tools Compa...
Chef vs Puppet vs Ansible vs SaltStack | Configuration Management Tools Compa...
 
Continuous Integration with Open Source Tools - PHPUgFfm 2014-11-20
Continuous Integration with Open Source Tools - PHPUgFfm 2014-11-20Continuous Integration with Open Source Tools - PHPUgFfm 2014-11-20
Continuous Integration with Open Source Tools - PHPUgFfm 2014-11-20
 
A Fabric/Puppet Build/Deploy System
A Fabric/Puppet Build/Deploy SystemA Fabric/Puppet Build/Deploy System
A Fabric/Puppet Build/Deploy System
 
Cloud Foundry Summit 2015: Managing Multiple Cloud with a Single BOSH Deploym...
Cloud Foundry Summit 2015: Managing Multiple Cloud with a Single BOSH Deploym...Cloud Foundry Summit 2015: Managing Multiple Cloud with a Single BOSH Deploym...
Cloud Foundry Summit 2015: Managing Multiple Cloud with a Single BOSH Deploym...
 
Deploying Windows Containers with Draft, Helm and Kubernetes
Deploying Windows Containers with Draft, Helm and KubernetesDeploying Windows Containers with Draft, Helm and Kubernetes
Deploying Windows Containers with Draft, Helm and Kubernetes
 
Nebulaworks Docker Overview 09-22-2015
Nebulaworks Docker Overview 09-22-2015Nebulaworks Docker Overview 09-22-2015
Nebulaworks Docker Overview 09-22-2015
 
Developing web apps
Developing web appsDeveloping web apps
Developing web apps
 
Docman - The swiss army knife for Drupal multisite docroot management and dep...
Docman - The swiss army knife for Drupal multisite docroot management and dep...Docman - The swiss army knife for Drupal multisite docroot management and dep...
Docman - The swiss army knife for Drupal multisite docroot management and dep...
 
eZ Platform Cloud and eZ Launchpad: Don’t Host, Don’t Deploy, Don’t Install—J...
eZ Platform Cloud and eZ Launchpad: Don’t Host, Don’t Deploy, Don’t Install—J...eZ Platform Cloud and eZ Launchpad: Don’t Host, Don’t Deploy, Don’t Install—J...
eZ Platform Cloud and eZ Launchpad: Don’t Host, Don’t Deploy, Don’t Install—J...
 
eZ Platform Cloud and eZ Launchpad: Don’t Host, Don’t Deploy, Don’t Install—J...
eZ Platform Cloud and eZ Launchpad: Don’t Host, Don’t Deploy, Don’t Install—J...eZ Platform Cloud and eZ Launchpad: Don’t Host, Don’t Deploy, Don’t Install—J...
eZ Platform Cloud and eZ Launchpad: Don’t Host, Don’t Deploy, Don’t Install—J...
 
Developing Microservices Directly in AKS/Kubernetes
Developing Microservices Directly in AKS/KubernetesDeveloping Microservices Directly in AKS/Kubernetes
Developing Microservices Directly in AKS/Kubernetes
 
Ontrack - Keeping track of your CI/CD mess
Ontrack - Keeping track of your CI/CD messOntrack - Keeping track of your CI/CD mess
Ontrack - Keeping track of your CI/CD mess
 
Deploy made easy (even on Friday)
Deploy made easy (even on Friday)Deploy made easy (even on Friday)
Deploy made easy (even on Friday)
 
7 Habits of Highly Effective Jenkins Users
7 Habits of Highly Effective Jenkins Users7 Habits of Highly Effective Jenkins Users
7 Habits of Highly Effective Jenkins Users
 
How to successfully migrate to Bazel from Maven or Gradle - Riga Dev Days
How to successfully migrate to Bazel from Maven or Gradle - Riga Dev DaysHow to successfully migrate to Bazel from Maven or Gradle - Riga Dev Days
How to successfully migrate to Bazel from Maven or Gradle - Riga Dev Days
 
Golang 101 for IT-Pros - Cisco Live Orlando 2018 - DEVNET-1808
Golang 101 for IT-Pros - Cisco Live Orlando 2018 - DEVNET-1808Golang 101 for IT-Pros - Cisco Live Orlando 2018 - DEVNET-1808
Golang 101 for IT-Pros - Cisco Live Orlando 2018 - DEVNET-1808
 

Mehr von Sonatype

The Unrealized Role of Monitoring & Alerting w/ Jason Hand
The Unrealized Role of Monitoring & Alerting w/ Jason HandThe Unrealized Role of Monitoring & Alerting w/ Jason Hand
The Unrealized Role of Monitoring & Alerting w/ Jason Hand
Sonatype
 

Mehr von Sonatype (20)

DevOps Days Columbus - Derek Weeks - 2019
DevOps Days Columbus - Derek Weeks - 2019DevOps Days Columbus - Derek Weeks - 2019
DevOps Days Columbus - Derek Weeks - 2019
 
2019 DevSecOps Reference Architectures
2019 DevSecOps Reference Architectures2019 DevSecOps Reference Architectures
2019 DevSecOps Reference Architectures
 
RSAC DevSecOpsDays 2018 - We are all Equifax
RSAC DevSecOpsDays 2018 - We are all EquifaxRSAC DevSecOpsDays 2018 - We are all Equifax
RSAC DevSecOpsDays 2018 - We are all Equifax
 
DevSecOps reference architectures 2018
DevSecOps reference architectures 2018DevSecOps reference architectures 2018
DevSecOps reference architectures 2018
 
30+ Nexus Integrations to Accelerate DevOps
30+ Nexus Integrations to Accelerate DevOps30+ Nexus Integrations to Accelerate DevOps
30+ Nexus Integrations to Accelerate DevOps
 
2017 DevSecOps Survey
2017 DevSecOps Survey2017 DevSecOps Survey
2017 DevSecOps Survey
 
Starting and Scaling DevOps In the Enterprise
Starting and Scaling DevOps In the EnterpriseStarting and Scaling DevOps In the Enterprise
Starting and Scaling DevOps In the Enterprise
 
DevOps Friendly Doc Publishing for APIs & Microservices
DevOps Friendly Doc Publishing for APIs & MicroservicesDevOps Friendly Doc Publishing for APIs & Microservices
DevOps Friendly Doc Publishing for APIs & Microservices
 
The Unrealized Role of Monitoring & Alerting w/ Jason Hand
The Unrealized Role of Monitoring & Alerting w/ Jason HandThe Unrealized Role of Monitoring & Alerting w/ Jason Hand
The Unrealized Role of Monitoring & Alerting w/ Jason Hand
 
DevOps and All the Continuouses w/ Helen Beal
DevOps and All the Continuouses w/ Helen BealDevOps and All the Continuouses w/ Helen Beal
DevOps and All the Continuouses w/ Helen Beal
 
Serverless and the Way Forward
Serverless and the Way ForwardServerless and the Way Forward
Serverless and the Way Forward
 
A Small Association's Journey to DevOps w/ Edward Ruiz
A Small Association's Journey to DevOps w/ Edward RuizA Small Association's Journey to DevOps w/ Edward Ruiz
A Small Association's Journey to DevOps w/ Edward Ruiz
 
What's My Security Policy Doing to My Help Desk w/ Chris Swan
What's My Security Policy Doing to My Help Desk w/ Chris SwanWhat's My Security Policy Doing to My Help Desk w/ Chris Swan
What's My Security Policy Doing to My Help Desk w/ Chris Swan
 
Characterizing and Contrasting Kuhn-tey-ner Awr-kuh-streyt-ors
Characterizing and Contrasting Kuhn-tey-ner Awr-kuh-streyt-orsCharacterizing and Contrasting Kuhn-tey-ner Awr-kuh-streyt-ors
Characterizing and Contrasting Kuhn-tey-ner Awr-kuh-streyt-ors
 
Static Analysis For Security and DevOps Happiness w/ Justin Collins
Static Analysis For Security and DevOps Happiness w/ Justin CollinsStatic Analysis For Security and DevOps Happiness w/ Justin Collins
Static Analysis For Security and DevOps Happiness w/ Justin Collins
 
Automated Infrastructure Security: Monitoring using FOSS
Automated Infrastructure Security: Monitoring using FOSSAutomated Infrastructure Security: Monitoring using FOSS
Automated Infrastructure Security: Monitoring using FOSS
 
System Hardening Using Ansible
System Hardening Using AnsibleSystem Hardening Using Ansible
System Hardening Using Ansible
 
There is No Server: Immutable Infrastructure and Serverless Architecture
There is No Server: Immutable Infrastructure and Serverless ArchitectureThere is No Server: Immutable Infrastructure and Serverless Architecture
There is No Server: Immutable Infrastructure and Serverless Architecture
 
Modern Infrastructure Automation
Modern Infrastructure AutomationModern Infrastructure Automation
Modern Infrastructure Automation
 
Continuous Everyone: Engaging People Across the Continuous Pipeline
Continuous Everyone: Engaging People Across the Continuous PipelineContinuous Everyone: Engaging People Across the Continuous Pipeline
Continuous Everyone: Engaging People Across the Continuous Pipeline
 

Kürzlich hochgeladen

+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
Health
 
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
masabamasaba
 
Abortion Pills In Pretoria ](+27832195400*)[ 🏥 Women's Abortion Clinic In Pre...
Abortion Pills In Pretoria ](+27832195400*)[ 🏥 Women's Abortion Clinic In Pre...Abortion Pills In Pretoria ](+27832195400*)[ 🏥 Women's Abortion Clinic In Pre...
Abortion Pills In Pretoria ](+27832195400*)[ 🏥 Women's Abortion Clinic In Pre...
Medical / Health Care (+971588192166) Mifepristone and Misoprostol tablets 200mg
 
Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...
Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...
Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...
chiefasafspells
 
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...
masabamasaba
 
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
masabamasaba
 

Kürzlich hochgeladen (20)

+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
 
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
 
WSO2Con2024 - Enabling Transactional System's Exponential Growth With Simplicity
WSO2Con2024 - Enabling Transactional System's Exponential Growth With SimplicityWSO2Con2024 - Enabling Transactional System's Exponential Growth With Simplicity
WSO2Con2024 - Enabling Transactional System's Exponential Growth With Simplicity
 
WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...
WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...
WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...
 
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
 
Abortion Pills In Pretoria ](+27832195400*)[ 🏥 Women's Abortion Clinic In Pre...
Abortion Pills In Pretoria ](+27832195400*)[ 🏥 Women's Abortion Clinic In Pre...Abortion Pills In Pretoria ](+27832195400*)[ 🏥 Women's Abortion Clinic In Pre...
Abortion Pills In Pretoria ](+27832195400*)[ 🏥 Women's Abortion Clinic In Pre...
 
Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...
Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...
Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...
 
What Goes Wrong with Language Definitions and How to Improve the Situation
What Goes Wrong with Language Definitions and How to Improve the SituationWhat Goes Wrong with Language Definitions and How to Improve the Situation
What Goes Wrong with Language Definitions and How to Improve the Situation
 
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
 
%in Rustenburg+277-882-255-28 abortion pills for sale in Rustenburg
%in Rustenburg+277-882-255-28 abortion pills for sale in Rustenburg%in Rustenburg+277-882-255-28 abortion pills for sale in Rustenburg
%in Rustenburg+277-882-255-28 abortion pills for sale in Rustenburg
 
WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...
WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...
WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...
 
WSO2CON 2024 - Navigating API Complexity: REST, GraphQL, gRPC, Websocket, Web...
WSO2CON 2024 - Navigating API Complexity: REST, GraphQL, gRPC, Websocket, Web...WSO2CON 2024 - Navigating API Complexity: REST, GraphQL, gRPC, Websocket, Web...
WSO2CON 2024 - Navigating API Complexity: REST, GraphQL, gRPC, Websocket, Web...
 
WSO2CON 2024 - How to Run a Security Program
WSO2CON 2024 - How to Run a Security ProgramWSO2CON 2024 - How to Run a Security Program
WSO2CON 2024 - How to Run a Security Program
 
WSO2CON 2024 - API Management Usage at La Poste and Its Impact on Business an...
WSO2CON 2024 - API Management Usage at La Poste and Its Impact on Business an...WSO2CON 2024 - API Management Usage at La Poste and Its Impact on Business an...
WSO2CON 2024 - API Management Usage at La Poste and Its Impact on Business an...
 
Announcing Codolex 2.0 from GDK Software
Announcing Codolex 2.0 from GDK SoftwareAnnouncing Codolex 2.0 from GDK Software
Announcing Codolex 2.0 from GDK Software
 
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...
 
%in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park %in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park
 
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
 
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
 
WSO2CON2024 - It's time to go Platformless
WSO2CON2024 - It's time to go PlatformlessWSO2CON2024 - It's time to go Platformless
WSO2CON2024 - It's time to go Platformless
 

Getting out of the Job Jungle with Jenkins

  • 1. GETTING OUT OF THE JOB JUNGLE @DamienCoraboeuf
  • 2. WHO AM I? ▸ Damien Coraboeuf (@DamienCoraboeuf) ▸ Born to Java in 1996 ▸ Working in Continuous Delivery since 2008 ▸ Automating pipelines @ FIS I’ll be your guide on this journey
  • 3. THE MAP Short introduction to Jenkins Birth of a pipeline Manual mode The Job DSL Branching and its consequences Pipeline as code Pipeline as not code Automation of automation We want to get there Look, there is another
 beach here! Do not go there! 💀 There are traps here! 💀
  • 4. DO YOU KNOW WHO THIS IS?
  • 5. JENKINS ▸ http://jenkins-ci.org/ ▸ Very versatile Continuous Integration engine ▸ ~ 70% of the CI market (2012 figures) ▸ Open source - strong community ▸ Extensible ▸ more than 1000 plugins ▸ easy to develop new ones ▸ Integrates with basically everything ▸ Job scheduler
  • 6. JENKINS - JOBS & FOLDERS
  • 7. JENKINS - JOB CONFIGURATION Let’s get some sources… Let’s run some build… Let’s trigger another job…
  • 8. PIPELINES ▸ Defining jobs ▸ Linking them together ▸ Running them in parallel or in sequence ▸ Some triggers are automatic, other ones are manual BUILD DEPLOY ENV 1 DEPLOY ENV 2 DEPLOY ENV 3 PUBLICATION RELEASE
  • 9. A PIPELINE IS BORN BUILD DEPLOY ENV 1 DEPLOY ENV 2 DEPLOY ENV 3 PUBLICATION RELEASE BUILD DEPLOY ENV 1 DEPLOY ENV 2 DEPLOY ENV 3 PUBLICATION RELEASE BUILD DEPLOY ENV 1 DEPLOY ENV 2 DEPLOY ENV 3 PUBLICATION RELEASE Commit 1 Commit 2 Commit 3
  • 10. SO FAR SO GOOD “Look Ma, I’ve built a pipeline!” “Lovely. Now, build one for your sister.”
  • 11. THE STORY Product A Product B Project C Maintenance 11.8 Maintenance 11.9 Maintenance 11.10 Maintenance 7.2 Maintenance 8.0 Maintenance 5.0 Check Publication WAS JBoss … Promotion for QA QAWAS QAJBoss … Promotion for NFT Sonar Fortify Perf Promotion for delivery Delivery Auto Manual Pipeline Products & Projects Branches …
  • 12. THE STORY Jenkins team > 5000 jobs and growing…
  • 13.
  • 14. In order to scale, we want: ✔ Self service ✔ Security ✔ Simplicity ✔ Extensibility
  • 15. “What are we?” “Developers!” “What do we do?” “Code!” “Why do we do it?” “Automation!”
  • 16. JOB DSL PLUGIN - START OF THE JOURNEY OUT OF THE JUNGLE ▸ Define a job using a Groovy based DSL!
  • 17. JOB DSL PLUGIN ▸ Very well supported ▸ Very good documentation ▸ Supports most of the plugins ▸ Built-in extensibility: inline or DSL extensions
  • 18. JOB DSL PLUGIN ▸ Folders & views ▸ … automatic triggers upon generation ▸ … using files in workspace
  • 19. JOB DSL PLUG-IN ▸ This remains code…
  • 20. JOB DSL PLUGIN - SEED JOB ▸ DSL based generation done from a job ▸ Can generate and/or update other jobs ▸ Can even run while jobs are running :) SEED JOB GENERATED JOB(S) DSL SCRIPT Generates Accesses (SCM or inline) GENERATED JOB(S) GENERATED JOB(S)
  • 21. PIPELINE EVOLUTION ▸ One Seed DSL job is all very good but… ▸ Pipeline evolves with the code Builds
 this code Builds
 this code W ill fail for this code New platform being
 added Job for the
 new platform
  • 22. BRANCHING ▸ One Seed DSL job is all very good but… ▸ Different pipelines for different branches develop release/2.0 Pipelines for releases
 might be more complex Release job
  • 23. PIPELINE VERSIONS ▸ Where do we put the DSL script? develop release/2.0 Pipelines for releases
 might be more complex DSL.GROOVY DSL.GROOVY DSL.GROOVY
  • 24. PIPELINE AS CODE ▸ Your pipeline is linked to the code it builds ▸ Define your pipeline in your code Project src pom.xml job-dsl-script.groovy
  • 25. PIPELINE CODE DUPLICATION ▸ We can now generate a pipeline for any branch, any commit
 
 
 
 ▸ It evolves with your branches and is merged like any other piece of code ▸ That’s good enough for 1 project ▸ With several (many) projects, the level of DSL code duplication explodes! DEVELOP FEATURE/BIG RELEASE/1.0 DSL SCRIPT DSL SCRIPT DSL SCRIPT DEVELOP FEATURE/BIG RELEASE/1.0 DSL SCRIPT DSL SCRIPT DSL SCRIPT DEVELOP FEATURE/BIG RELEASE/1.0 DSL SCRIPT DSL SCRIPT DSL SCRIPT DEVELOP FEATURE/BIG RELEASE/1.0 DSL SCRIPT DSL SCRIPT DSL SCRIPT DEVELOP FEATURE/BIG RELEASE/1.0 DSL SCRIPT DSL SCRIPT DSL SCRIPT
  • 26. PIPELINE CODE DUPLICATION ▸ Job DSL code duplication has the same issues than production code duplication DEVELOP FEATURE/BIG RELEASE/1.0 DSL SCRIPT DSL SCRIPT DSL SCRIPT DEVELOP FEATURE/BIG RELEASE/1.0 DSL SCRIPT DSL SCRIPT DSL SCRIPT DEVELOP FEATURE/BIG RELEASE/1.0 DSL SCRIPT DSL SCRIPT DSL SCRIPT DEVELOP FEATURE/BIG RELEASE/1.0 DSL SCRIPT DSL SCRIPT DSL SCRIPT ✘ ✘ ✘ ✘ ✘ ✘ ✘✘✘✘✘✘ DEVELOP FEATURE/BIG RELEASE/1.0 DSL SCRIPT DSL SCRIPT DSL SCRIPT DEVELOP FEATURE/BIG RELEASE/1.0 DSL SCRIPT DSL SCRIPT DSL SCRIPT ✘✘✘✘✘✘ DEVELOP FEATURE/BIG RELEASE/1.0 DSL SCRIPT DSL SCRIPT DSL SCRIPT DEVELOP FEATURE/BIG RELEASE/1.0 DSL SCRIPT DSL SCRIPT DSL SCRIPT ✘✘✘✘✘✘ DEVELOP DSL SCRIPT DEVELOP DSL SCRIPT ✘ ✘ DEVELOP DSL SCRIPT ✘ DEVELOP DSL SCRIPT ✘ LEASE/1.0 L SCRIPT LEASE/1.0 L SCRIPT LEASE/1.0 L SCRIPT LEASE/1.0 L SCRIPT DEVELOP FEATURE/BIG RELEASE/1.0 DEVELOP FEATURE/BIG RELEASE/1.0 DEVELOPLEASE/1.0
  • 27.
  • 28. PIPELINE LIBRARIES TO THE RESCUE ▸ Pipeline is code ▸ Reuse of code through versioned libraries DEVELOP FEATURE/BIG RELEASE/1.0 DSL SCRIPT DSL SCRIPT DSL SCRIPT PIPELINE DSL LIBRARY 1.1 1.0 Normal project
 Can be tested
 Can be released
  • 29. PIPELINE DSL LIBRARY B PIPELINE LIBRARIES TO THE RESCUE ▸ DSL libraries as code libraries DEVELOP FEATURE/BIG DEVELOP DSL SCRIPT DSL SCRIPT DSL SCRIPT PIPELINE DSL LIBRARY A 1.1 1.0 COMMON DSL LIBRARY 1.0 Dependencies 2.0
  • 30. ARE WE DONE? ▸ We can describe a pipeline using a DSL ▸ The pipeline is defined together with the code it builds ▸ The DSL can use libraries to reduce code duplication ?
  • 31. NOT QUITE… ▸ This is not enough to really scale ▸ We still have to write some DSL ▸ Self service ✔ ▸ Security ✘ ▸ Simplicity ✘ ▸ Extensibility ✔
  • 32. PIPELINE AS “NOT CODE” ▸ Let’s describe the pipeline using a properties file ▸ Which pipeline library & which version ▸ Configuration properties - specific to the library ▸ Property file format ubiquitous ▸ No code running on the master ▸ Can be used for reporting on all the pipelines!
  • 34. PIPELINE AS… PROPERTIES SEED JOB SCM Repository Jobs Gets the
 seed.properties Gets the pipeline
 library version Configures and runs
 the pipeline library
  • 36. PIPELINE AS… METADATA ▸ The seed.properties files provide a wonderful way to do reporting on all projects and branches DEVELOP FEATURE/BIG RELEASE/1.0 SEED SEED SEED DEVELOP FEATURE/NEW RELEASE/3.4 SEED SEED SEED seed.properties seed.properties “Give me all branches using JDK 6”
 “Give me all projects having no SonarQube scan”
 “…”
  • 37. SEED PLUGIN ▸ https://github.com/jenkinsci/seed-plugin ▸ Allows to generate: ▸ projects folders ▸ branches pipelines ▸ based on seed files (properties and/or DSL) ▸ integration with hooks
  • 38. SEVERAL INTEGRATION MODES SEED.PROPERTIES SEED PLUGIN SEED.PROPERTIES SEED.GROOVYSEED.GROOVY PIPELINE LIBRARY PIPELINE LIBRARY BRANCH PIPELINE 95% 4% 1%
  • 39. GENERATION STRUCTURE SEED PROJECT GENERATOR PROJECT FOLDER BOOTSTRAPPING BRANCH GENERATOR BRANCH FOLDER BRANCH JOB 1 BRANCH JOB 2 BRANCH JOB 3 BRANCH JOB 4 GENERATION Project teamJenkins team
  • 40. PIPELINE SECURITY SEED A FOLDER A GENERATOR BOOTSTRAPPING A team Jenkins team B team GENERATION A BRANCHES A PIPELINES B FOLDER B GENERATOR B BRANCHES B PIPELINES
  • 41. GENERATION - HOW IT LOOKS LIKE BOOTSTRAPPING GENERATION GENERATION
  • 43. HOOKS ▸ Generations can be automated using hooks at SCM level ▸ Support for GitHub, BitBucket, generic HTTP calls (for SVN) ▸ Configurable. For example: BRANCH CREATION SCM EVENT Seed plug-in COMMIT SEED CHANGED BRANCH DELETION PIPELINE EVENT Generation Triggers the pipeline Regenerates the pipeline Deletes the pipeline
  • 44. RESPONSIBILITIES Jenkins team Pipeline libraries Develops and maintains Development team Seed files Defines Seed plug-in SCM Triggers
  • 45. WHAT DID WE JUST ACHIEVE? ▸ Automation of automation ▸ Self service ✔ ▸ Pipeline automation from SCM ▸ Security ✔ ▸ Project level authorisations ▸ No code on the master ▸ Simplicity ✔ ▸ Property files ▸ Extensibility ✔ ▸ Pipeline libraries ▸ Direct job DSL still possible
  • 46. OUT OF THE JUNGLE…
  • 47. SEED & PIPELINE PLUGIN ▸ The Seed plugin will keep working ▸ It can already generate pipeline jobs (Job DSL) ▸ But overlap of functionalities Branch pipelines Pipeline as code SEED PIPELINE Hook integration Pipeline as properties Community & support Pipeline libraries Pipeline script library
  • 48. SEED IN PIPELINE PLUGIN ▸ The Seed plugin as extension of the Pipeline plugin Branch pipelines Pipeline as code SEED PIPELINE Hook integrationPipeline as properties Community & support Pipeline libraries Pipeline script library
  • 49. THANKS YOU! Thanks to: Contact: ▸ http://nemerosa.com ▸ @DamienCoraboeuf