Belgium jenkins-meetup-job-jungle-0.1

Damien Coraboeuf
Damien CoraboeufContinuous Delivery Expert at Clear2Pay
JOB SCALABILITY IN JENKINS
GETTING OUT OF THE JOB JUNGLE
JBAM - June 1st 2017 - @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
> 10 jobs?
> 100 jobs?
> 1000 jobs?
> 10000 jobs?
2052
3244
4365
6668
10373
0
2000
4000
6000
8000
10000
12000
Oct-15 Jan-16 May-16 Aug-16 Nov-16 Mar-17 Jun-17
Jobs
10373 JOBS IN 3 YEARS
STORY OF A JOURNEY OUT OF THE JUNGLE
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!
💀
x✔
Three years ago in the
jungle…
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
> 10000 jobs and growing…
Belgium jenkins-meetup-job-jungle-0.1
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
Belgium jenkins-meetup-job-jungle-0.1
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
▸ Putting everything together
▸ 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 the
Jenkins

Belgium Area

Meetup
Contact:
▸ http://nemerosa.com
▸ @DamienCoraboeuf
1 of 51

Recommended

ITB2019 Try This At Home: Building a Personal Docker Swarm - Matt Clemente by
ITB2019 Try This At Home: Building a Personal Docker Swarm - Matt ClementeITB2019 Try This At Home: Building a Personal Docker Swarm - Matt Clemente
ITB2019 Try This At Home: Building a Personal Docker Swarm - Matt ClementeOrtus Solutions, Corp
468 views56 slides
Modern Web Application Development Workflow - web2day 2014 by
Modern Web Application Development Workflow - web2day 2014Modern Web Application Development Workflow - web2day 2014
Modern Web Application Development Workflow - web2day 2014Stéphane Bégaudeau
3.5K views206 slides
Dockercon2015 bamboo by
Dockercon2015 bambooDockercon2015 bamboo
Dockercon2015 bambooSteve Smith
27.9K views32 slides
Dockerize WordPress on Mac/Windows by
Dockerize WordPress on Mac/WindowsDockerize WordPress on Mac/Windows
Dockerize WordPress on Mac/WindowsKite Koga
2.6K views29 slides
Scaling your jenkins master with docker by
Scaling your jenkins master with dockerScaling your jenkins master with docker
Scaling your jenkins master with dockerChristophe Muller
1.2K views24 slides
Getting out of the Job Jungle with Jenkins by
Getting out of the Job Jungle with JenkinsGetting out of the Job Jungle with Jenkins
Getting out of the Job Jungle with JenkinsSonatype
548 views51 slides

More Related Content

Similar to Belgium jenkins-meetup-job-jungle-0.1

Making the most of your gradle build - Devoxx PL 2017 by
Making the most of your gradle build - Devoxx PL 2017Making the most of your gradle build - Devoxx PL 2017
Making the most of your gradle build - Devoxx PL 2017Andres Almiray
307 views51 slides
Making cloud portability a practical reality (i pad) by
Making cloud portability a practical reality (i pad)Making cloud portability a practical reality (i pad)
Making cloud portability a practical reality (i pad)Nati Shalom
704 views17 slides
zebra & openconfigd Introduction by
zebra & openconfigd Introductionzebra & openconfigd Introduction
zebra & openconfigd IntroductionKentaro Ebisawa
813 views9 slides
Chef vs Puppet vs Ansible vs SaltStack | Configuration Management Tools Compa... by
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...Edureka!
5.7K views29 slides
Migrate Early, Migrate Often: JDK release cadence strategies by
Migrate Early, Migrate Often: JDK release cadence strategiesMigrate Early, Migrate Often: JDK release cadence strategies
Migrate Early, Migrate Often: JDK release cadence strategiesDanHeidinga
191 views42 slides
Javaland 2014 / GWT architectures and lessons learned by
Javaland 2014 / GWT architectures and lessons learnedJavaland 2014 / GWT architectures and lessons learned
Javaland 2014 / GWT architectures and lessons learnedpgt technology scouting GmbH
3.9K views107 slides

Similar to Belgium jenkins-meetup-job-jungle-0.1(20)

Making the most of your gradle build - Devoxx PL 2017 by Andres Almiray
Making the most of your gradle build - Devoxx PL 2017Making the most of your gradle build - Devoxx PL 2017
Making the most of your gradle build - Devoxx PL 2017
Andres Almiray307 views
Making cloud portability a practical reality (i pad) by Nati Shalom
Making cloud portability a practical reality (i pad)Making cloud portability a practical reality (i pad)
Making cloud portability a practical reality (i pad)
Nati Shalom704 views
zebra & openconfigd Introduction by Kentaro Ebisawa
zebra & openconfigd Introductionzebra & openconfigd Introduction
zebra & openconfigd Introduction
Kentaro Ebisawa813 views
Chef vs Puppet vs Ansible vs SaltStack | Configuration Management Tools Compa... by Edureka!
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...
Edureka!5.7K views
Migrate Early, Migrate Often: JDK release cadence strategies by DanHeidinga
Migrate Early, Migrate Often: JDK release cadence strategiesMigrate Early, Migrate Often: JDK release cadence strategies
Migrate Early, Migrate Often: JDK release cadence strategies
DanHeidinga191 views
Slides Aquarium Paris 2008 by julien.ponge
Slides Aquarium Paris 2008Slides Aquarium Paris 2008
Slides Aquarium Paris 2008
julien.ponge682 views
PostgreSQL 12: What is coming up?, Enterprise Postgres Day by EDB
PostgreSQL 12: What is coming up?, Enterprise Postgres DayPostgreSQL 12: What is coming up?, Enterprise Postgres Day
PostgreSQL 12: What is coming up?, Enterprise Postgres Day
EDB503 views
Open Source at Zalando - OSB Open Source Day 2019 by Henning Jacobs
Open Source at Zalando - OSB Open Source Day 2019Open Source at Zalando - OSB Open Source Day 2019
Open Source at Zalando - OSB Open Source Day 2019
Henning Jacobs649 views
Javaone - Gradle: Harder, Better, Stronger, Faster by Andres Almiray
Javaone - Gradle: Harder, Better, Stronger, Faster Javaone - Gradle: Harder, Better, Stronger, Faster
Javaone - Gradle: Harder, Better, Stronger, Faster
Andres Almiray2.2K views
IDNOG 4 Lightning Talks - Documenting your Network in 3 Simple Steps by Affan Basalamah
IDNOG 4 Lightning Talks - Documenting your Network in 3 Simple StepsIDNOG 4 Lightning Talks - Documenting your Network in 3 Simple Steps
IDNOG 4 Lightning Talks - Documenting your Network in 3 Simple Steps
Affan Basalamah268 views
Deploy made easy (even on Friday) by Riccardo Bini
Deploy made easy (even on Friday)Deploy made easy (even on Friday)
Deploy made easy (even on Friday)
Riccardo Bini2.7K views
Ontrack - Keeping track of your CI/CD mess by Damien Coraboeuf
Ontrack - Keeping track of your CI/CD messOntrack - Keeping track of your CI/CD mess
Ontrack - Keeping track of your CI/CD mess
Damien Coraboeuf646 views
Making the most of your gradle build - vJUG24 2017 by Andres Almiray
Making the most of your gradle build - vJUG24 2017Making the most of your gradle build - vJUG24 2017
Making the most of your gradle build - vJUG24 2017
Andres Almiray397 views
Making the most of your gradle build - BaselOne 2017 by Andres Almiray
Making the most of your gradle build - BaselOne 2017Making the most of your gradle build - BaselOne 2017
Making the most of your gradle build - BaselOne 2017
Andres Almiray883 views
Powering Microservices with Docker, Kubernetes, Kafka, and MongoDB by MongoDB
Powering Microservices with Docker, Kubernetes, Kafka, and MongoDBPowering Microservices with Docker, Kubernetes, Kafka, and MongoDB
Powering Microservices with Docker, Kubernetes, Kafka, and MongoDB
MongoDB826 views

Recently uploaded

WebAssembly by
WebAssemblyWebAssembly
WebAssemblyJens Siebert
33 views18 slides
Geospatial Synergy: Amplifying Efficiency with FME & Esri ft. Peak Guest Spea... by
Geospatial Synergy: Amplifying Efficiency with FME & Esri ft. Peak Guest Spea...Geospatial Synergy: Amplifying Efficiency with FME & Esri ft. Peak Guest Spea...
Geospatial Synergy: Amplifying Efficiency with FME & Esri ft. Peak Guest Spea...Safe Software
412 views59 slides
SAP FOR CONTRACT MANUFACTURING.pdf by
SAP FOR CONTRACT MANUFACTURING.pdfSAP FOR CONTRACT MANUFACTURING.pdf
SAP FOR CONTRACT MANUFACTURING.pdfVirendra Rai, PMP
11 views2 slides
Keep by
KeepKeep
KeepGeniusee
73 views10 slides
DSD-INT 2023 Wave-Current Interaction at Montrose Tidal Inlet System and Its ... by
DSD-INT 2023 Wave-Current Interaction at Montrose Tidal Inlet System and Its ...DSD-INT 2023 Wave-Current Interaction at Montrose Tidal Inlet System and Its ...
DSD-INT 2023 Wave-Current Interaction at Montrose Tidal Inlet System and Its ...Deltares
9 views32 slides
SAP FOR TYRE INDUSTRY.pdf by
SAP FOR TYRE INDUSTRY.pdfSAP FOR TYRE INDUSTRY.pdf
SAP FOR TYRE INDUSTRY.pdfVirendra Rai, PMP
23 views3 slides

Recently uploaded(20)

Geospatial Synergy: Amplifying Efficiency with FME & Esri ft. Peak Guest Spea... by Safe Software
Geospatial Synergy: Amplifying Efficiency with FME & Esri ft. Peak Guest Spea...Geospatial Synergy: Amplifying Efficiency with FME & Esri ft. Peak Guest Spea...
Geospatial Synergy: Amplifying Efficiency with FME & Esri ft. Peak Guest Spea...
Safe Software412 views
DSD-INT 2023 Wave-Current Interaction at Montrose Tidal Inlet System and Its ... by Deltares
DSD-INT 2023 Wave-Current Interaction at Montrose Tidal Inlet System and Its ...DSD-INT 2023 Wave-Current Interaction at Montrose Tidal Inlet System and Its ...
DSD-INT 2023 Wave-Current Interaction at Montrose Tidal Inlet System and Its ...
Deltares9 views
Tridens DevOps by Tridens
Tridens DevOpsTridens DevOps
Tridens DevOps
Tridens9 views
Upgrading Incident Management with Icinga - Icinga Camp Milan 2023 by Icinga
Upgrading Incident Management with Icinga - Icinga Camp Milan 2023Upgrading Incident Management with Icinga - Icinga Camp Milan 2023
Upgrading Incident Management with Icinga - Icinga Camp Milan 2023
Icinga38 views
DSD-INT 2023 Next-Generation Flood Inundation Mapping for Taiwan - Delft3D FM... by Deltares
DSD-INT 2023 Next-Generation Flood Inundation Mapping for Taiwan - Delft3D FM...DSD-INT 2023 Next-Generation Flood Inundation Mapping for Taiwan - Delft3D FM...
DSD-INT 2023 Next-Generation Flood Inundation Mapping for Taiwan - Delft3D FM...
Deltares7 views
2023-November-Schneider Electric-Meetup-BCN Admin Group.pptx by animuscrm
2023-November-Schneider Electric-Meetup-BCN Admin Group.pptx2023-November-Schneider Electric-Meetup-BCN Admin Group.pptx
2023-November-Schneider Electric-Meetup-BCN Admin Group.pptx
animuscrm13 views
DSD-INT 2023 - Delft3D User Days - Welcome - Day 3 - Afternoon by Deltares
DSD-INT 2023 - Delft3D User Days - Welcome - Day 3 - AfternoonDSD-INT 2023 - Delft3D User Days - Welcome - Day 3 - Afternoon
DSD-INT 2023 - Delft3D User Days - Welcome - Day 3 - Afternoon
Deltares13 views
El Arte de lo Possible by Neo4j
El Arte de lo PossibleEl Arte de lo Possible
El Arte de lo Possible
Neo4j38 views
Mark Simpson - UKOUG23 - Refactoring Monolithic Oracle Database Applications ... by marksimpsongw
Mark Simpson - UKOUG23 - Refactoring Monolithic Oracle Database Applications ...Mark Simpson - UKOUG23 - Refactoring Monolithic Oracle Database Applications ...
Mark Simpson - UKOUG23 - Refactoring Monolithic Oracle Database Applications ...
marksimpsongw76 views
Unmasking the Dark Art of Vectored Exception Handling: Bypassing XDR and EDR ... by Donato Onofri
Unmasking the Dark Art of Vectored Exception Handling: Bypassing XDR and EDR ...Unmasking the Dark Art of Vectored Exception Handling: Bypassing XDR and EDR ...
Unmasking the Dark Art of Vectored Exception Handling: Bypassing XDR and EDR ...
Donato Onofri711 views
BushraDBR: An Automatic Approach to Retrieving Duplicate Bug Reports by Ra'Fat Al-Msie'deen
BushraDBR: An Automatic Approach to Retrieving Duplicate Bug ReportsBushraDBR: An Automatic Approach to Retrieving Duplicate Bug Reports
BushraDBR: An Automatic Approach to Retrieving Duplicate Bug Reports
Elevate your SAP landscape's efficiency and performance with HCL Workload Aut... by HCLSoftware
Elevate your SAP landscape's efficiency and performance with HCL Workload Aut...Elevate your SAP landscape's efficiency and performance with HCL Workload Aut...
Elevate your SAP landscape's efficiency and performance with HCL Workload Aut...
HCLSoftware6 views
What Can Employee Monitoring Software Do?​ by wAnywhere
What Can Employee Monitoring Software Do?​What Can Employee Monitoring Software Do?​
What Can Employee Monitoring Software Do?​
wAnywhere21 views

Belgium jenkins-meetup-job-jungle-0.1

  • 1. JOB SCALABILITY IN JENKINS GETTING OUT OF THE JOB JUNGLE JBAM - June 1st 2017 - @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. > 10 jobs? > 100 jobs? > 1000 jobs? > 10000 jobs?
  • 4. 2052 3244 4365 6668 10373 0 2000 4000 6000 8000 10000 12000 Oct-15 Jan-16 May-16 Aug-16 Nov-16 Mar-17 Jun-17 Jobs 10373 JOBS IN 3 YEARS
  • 5. STORY OF A JOURNEY OUT OF THE JUNGLE
  • 6. 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! 💀
  • 7. x✔ Three years ago in the jungle…
  • 8. JENKINS - JOBS & FOLDERS
  • 9. JENKINS - JOB CONFIGURATION Let’s get some sources… Let’s run some build… Let’s trigger another job…
  • 10. 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
  • 11. 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
  • 12. SO FAR SO GOOD “Look Ma, I’ve built a pipeline!” “Lovely. Now, build one for your sister.”
  • 13. 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 …
  • 14. THE STORY Jenkins team > 10000 jobs and growing…
  • 16. In order to scale, we want: ✔ Self service ✔ Security ✔ Simplicity ✔ Extensibility
  • 17. “What are we?” “Developers!” “What do we do?” “Code!” “Why do we do it?” “Automation!”
  • 18. JOB DSL PLUGIN - START OF THE JOURNEY OUT OF THE JUNGLE ▸ Define a job using a Groovy based DSL!
  • 19. JOB DSL PLUGIN ▸ Very well supported ▸ Very good documentation ▸ Supports most of the plugins ▸ Built-in extensibility: inline or DSL extensions
  • 20. JOB DSL PLUGIN ▸ Folders & views ▸ … automatic triggers upon generation ▸ … using files in workspace
  • 21. JOB DSL PLUG-IN ▸ This remains code…
  • 22. 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)
  • 23. 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
  • 24. 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
  • 25. 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
  • 26. 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
  • 27. 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
  • 28. 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
  • 30. 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
  • 31. 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
  • 32. 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 ?
  • 33. NOT QUITE… ▸ This is not enough to really scale ▸ We still have to write some DSL ▸ Self service ✔ ▸ Security ✘ ▸ Simplicity ✘ ▸ Extensibility ✔
  • 34. 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!
  • 36. PIPELINE AS… PROPERTIES SEED JOB SCM Repository Jobs Gets the
 seed.properties Gets the pipeline
 library version Configures and runs
 the pipeline library
  • 38. 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”
 “…”
  • 39. SEED PLUGIN ▸ Putting everything together ▸ https://github.com/jenkinsci/seed-plugin ▸ Allows to generate: ▸ projects folders ▸ branches pipelines ▸ based on seed files (properties and/or DSL) ▸ integration with hooks
  • 40. SEVERAL INTEGRATION MODES SEED.PROPERTIES SEED PLUGIN SEED.PROPERTIES SEED.GROOVYSEED.GROOVY PIPELINE LIBRARY PIPELINE LIBRARY BRANCH PIPELINE 95% 4% 1%
  • 41. 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
  • 42. 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
  • 43. GENERATION - HOW IT LOOKS LIKE BOOTSTRAPPING GENERATION GENERATION
  • 45. 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
  • 46. RESPONSIBILITIES Jenkins team Pipeline libraries Develops and maintains Development team Seed files Defines Seed plug-in SCM Triggers
  • 47. 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
  • 48. OUT OF THE JUNGLE…
  • 49. 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
  • 50. 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
  • 51. THANKS YOU! Thanks to the Jenkins
 Belgium Area
 Meetup Contact: ▸ http://nemerosa.com ▸ @DamienCoraboeuf