SlideShare a Scribd company logo
Manage your jobs with Job DSL 
Niels Bech Nielsen, 9consult 
nbn@nine.dk
Services 
Public Services 
Professional Services 
Projects & DevOps 
Application Management 
Architecture 
Security 
Open Source
3 
>sed –i s/bug/feature/g * 
>git commit -a -m ”Fixed” 
Happy 
Customer 
Continuous Integration X–Mas Pipeline 
One Button 
Deployment 
Circle of Software Development
4 
How do you manage changes in your Pipelines? 
X 
?
5 
Project A 
How do you manage changes in your Pipelines? 
• Commit 
• Regression 
tests 
• Integration 
Tests 
• Q+A 
• Deployment 
Project B 
• Commit 
• Nightly 
Release 
• Regression 
tests 
• Q+A 
• Deployment 
Project C 
• Commit 
• Integration 
Tests 
• Test Deploy 
• Acceptance 
Tests 
• Q+A 
• Deployment
6 
Options include 
• Template Project Plugin 
• Job Generator Plugin 
• Parameterized Build Plugin 
• … (your own homegrown solution or click-edit) 
• Job DSL Plugin
7 
Configuration as Code 
• Treat your configuration as Code 
Versioned 
Simplified 
DRY 
• Job DSL provide a simple, intuitive 
Groovy DSL to create Jenkins jobs 
from scripts 
Generate all your jobs from a ’seed’ 
job 
Abstract utility functions 
Supports all Jenkins plugins through 
extension 
• NO MORE HTML EDITING
8 
Photo Credits 
• Nerd – Stephanie Klocke 
• Happy Customer – VeganSoldier 
• Fujii and Pri – Marcelo Jorge Vieria 
• Jenkins without broken builds – Henrique Imbertti Jr 
• Antares Rocket Test Launch – NASA 
• Launch Button – Steven Depolo 
• Etsy Jenkins Cluster – Noah Sussman
9 
Simple DSL example 
def project = 'nbn/griffon-maven-plugin' 
def branchApi = new URL("https://api.github.com/repos/${project}/branches") 
def branches = new groovy.json.JsonSlurper().parse(branchApi.newReader()) 
branches.each { 
def branchName = it.name 
job { 
name "${project}-${branchName}".replaceAll('/','-') 
scm { 
git("git://github.com/${project}.git", branchName) 
} 
steps { 
maven("test -Dproject.name=${project}/${branchName} ") 
} 
} 
} 
https://github.com/jenkinsci/job-dsl-plugin/wiki/Job-DSL-Commands
10 
Utility Methods in Common Files 
import javaposse.jobdsl.dsl.Job 
public class Common { 
static def addNightlyScmTrigger(Job job) { 
job.with { 
triggers { 
scm('H 23 * * *') 
} } } } 
import Common 
def job = … 
Common.addNightlyScmTrigger(job)
11 
Extending the project with custom XML 
${project}/config.xml
12 
Configure Project Node 
job { 
name "${project}-${branchName}".replaceAll('/','-') 
scm { 
git("git://github.com/${project}.git", branchName) 
} 
steps { 
maven("test -Dproject.name=${project}/${branchName} ") 
} 
configure { projectNode -> 
projectNode / publishers << "hudson.plugins.jdepend.JDependRecorder" { 
configuredJDependFile() 
} 
}
13 
Monkey Patch 
• Add new features to job dsl entities 
Find existing ContextNode and add new method 
Import JDependContext 
job { 
name "${project}-${branchName}".replaceAll('/','-') 
scm { 
git("git://github.com/${project}.git", branchName) 
} 
publishers { 
jdepend() // Takes an optional string arg 
} 
}
14 
Monkey Patching in a Static Block 
import javaposse.jobdsl.dsl.helpers.publisher.* 
public class JDependContext { 
static { 
PublisherContext.metaClass.jdepend = { String preGeneratedJDependFile = '' -> 
publisherNodes << new NodeBuilder(). 
"hudson.plugins.jdepend.JDependRecorder" { 
configuredJDependFile(preGeneratedJDependFile) 
} 
} 
}

More Related Content

What's hot

Puppetcamp r10kyaml
Puppetcamp r10kyamlPuppetcamp r10kyaml
Puppetcamp r10kyaml
Puppet
 
Web Performance Part 4 "Client-side performance"
Web Performance Part 4  "Client-side performance"Web Performance Part 4  "Client-side performance"
Web Performance Part 4 "Client-side performance"
Binary Studio
 
Untangling - fall2017 - week 9
Untangling - fall2017 - week 9Untangling - fall2017 - week 9
Untangling - fall2017 - week 9
Derek Jacoby
 
Continuous integration of_puppet_code
Continuous integration of_puppet_codeContinuous integration of_puppet_code
Continuous integration of_puppet_code
Devoteam Revolve
 
Ceylon From Here to Infinity: The Big Picture and What's Coming
Ceylon From Here to Infinity: The Big Picture and What's Coming Ceylon From Here to Infinity: The Big Picture and What's Coming
Ceylon From Here to Infinity: The Big Picture and What's Coming
Virtual JBoss User Group
 
Untangling - fall2017 - week 10
Untangling - fall2017 - week 10Untangling - fall2017 - week 10
Untangling - fall2017 - week 10
Derek Jacoby
 
Ci of js and apex using jasmine, phantom js and drone io df14
Ci of js and apex using jasmine, phantom js and drone io   df14Ci of js and apex using jasmine, phantom js and drone io   df14
Ci of js and apex using jasmine, phantom js and drone io df14
Kevin Poorman
 
Untangling11
Untangling11Untangling11
Untangling11
Derek Jacoby
 
vBrownBag DevOps Series: Puppetinabox
vBrownBag DevOps Series: PuppetinaboxvBrownBag DevOps Series: Puppetinabox
vBrownBag DevOps Series: Puppetinabox
Robert Nelson
 
Docker (compose) in devops - prague docker meetup
Docker (compose) in devops - prague docker meetupDocker (compose) in devops - prague docker meetup
Docker (compose) in devops - prague docker meetup
Juraj Kojdjak
 
Provisioning environments. A simplistic approach
Provisioning  environments. A simplistic approachProvisioning  environments. A simplistic approach
Provisioning environments. A simplistic approach
Eder Roger Souza
 
Tame your test environment with Docker Compose
Tame your test environment with Docker ComposeTame your test environment with Docker Compose
Tame your test environment with Docker Compose
Kevin Bell
 
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
Mandi Walls
 
Build your application in seconds and optimize workflow as much as you can us...
Build your application in seconds and optimize workflow as much as you can us...Build your application in seconds and optimize workflow as much as you can us...
Build your application in seconds and optimize workflow as much as you can us...
Alex S
 
Using CI for continuous delivery Part 1
Using CI for continuous delivery Part 1Using CI for continuous delivery Part 1
Using CI for continuous delivery Part 1
Vishal Biyani
 
Implementing your own Google App Engine
Implementing your own Google App Engine Implementing your own Google App Engine
Implementing your own Google App Engine
Virtual JBoss User Group
 
"Technical Challenges behind Visual IDE for React Components" Tetiana Mandziuk
"Technical Challenges behind Visual IDE for React Components" Tetiana Mandziuk"Technical Challenges behind Visual IDE for React Components" Tetiana Mandziuk
"Technical Challenges behind Visual IDE for React Components" Tetiana Mandziuk
Fwdays
 
Zero To Cloud (OSCon 2014)
Zero To Cloud (OSCon 2014)Zero To Cloud (OSCon 2014)
Zero To Cloud (OSCon 2014)
Justin Ryan
 
Infrastructure Automation at Scale
Infrastructure Automation at ScaleInfrastructure Automation at Scale
Infrastructure Automation at Scale
DataCentred
 
CollabSphere 2020 - NSF ODP Tooling
CollabSphere 2020 - NSF ODP ToolingCollabSphere 2020 - NSF ODP Tooling
CollabSphere 2020 - NSF ODP Tooling
Jesse Gallagher
 

What's hot (20)

Puppetcamp r10kyaml
Puppetcamp r10kyamlPuppetcamp r10kyaml
Puppetcamp r10kyaml
 
Web Performance Part 4 "Client-side performance"
Web Performance Part 4  "Client-side performance"Web Performance Part 4  "Client-side performance"
Web Performance Part 4 "Client-side performance"
 
Untangling - fall2017 - week 9
Untangling - fall2017 - week 9Untangling - fall2017 - week 9
Untangling - fall2017 - week 9
 
Continuous integration of_puppet_code
Continuous integration of_puppet_codeContinuous integration of_puppet_code
Continuous integration of_puppet_code
 
Ceylon From Here to Infinity: The Big Picture and What's Coming
Ceylon From Here to Infinity: The Big Picture and What's Coming Ceylon From Here to Infinity: The Big Picture and What's Coming
Ceylon From Here to Infinity: The Big Picture and What's Coming
 
Untangling - fall2017 - week 10
Untangling - fall2017 - week 10Untangling - fall2017 - week 10
Untangling - fall2017 - week 10
 
Ci of js and apex using jasmine, phantom js and drone io df14
Ci of js and apex using jasmine, phantom js and drone io   df14Ci of js and apex using jasmine, phantom js and drone io   df14
Ci of js and apex using jasmine, phantom js and drone io df14
 
Untangling11
Untangling11Untangling11
Untangling11
 
vBrownBag DevOps Series: Puppetinabox
vBrownBag DevOps Series: PuppetinaboxvBrownBag DevOps Series: Puppetinabox
vBrownBag DevOps Series: Puppetinabox
 
Docker (compose) in devops - prague docker meetup
Docker (compose) in devops - prague docker meetupDocker (compose) in devops - prague docker meetup
Docker (compose) in devops - prague docker meetup
 
Provisioning environments. A simplistic approach
Provisioning  environments. A simplistic approachProvisioning  environments. A simplistic approach
Provisioning environments. A simplistic approach
 
Tame your test environment with Docker Compose
Tame your test environment with Docker ComposeTame your test environment with Docker Compose
Tame your test environment with Docker Compose
 
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
 
Build your application in seconds and optimize workflow as much as you can us...
Build your application in seconds and optimize workflow as much as you can us...Build your application in seconds and optimize workflow as much as you can us...
Build your application in seconds and optimize workflow as much as you can us...
 
Using CI for continuous delivery Part 1
Using CI for continuous delivery Part 1Using CI for continuous delivery Part 1
Using CI for continuous delivery Part 1
 
Implementing your own Google App Engine
Implementing your own Google App Engine Implementing your own Google App Engine
Implementing your own Google App Engine
 
"Technical Challenges behind Visual IDE for React Components" Tetiana Mandziuk
"Technical Challenges behind Visual IDE for React Components" Tetiana Mandziuk"Technical Challenges behind Visual IDE for React Components" Tetiana Mandziuk
"Technical Challenges behind Visual IDE for React Components" Tetiana Mandziuk
 
Zero To Cloud (OSCon 2014)
Zero To Cloud (OSCon 2014)Zero To Cloud (OSCon 2014)
Zero To Cloud (OSCon 2014)
 
Infrastructure Automation at Scale
Infrastructure Automation at ScaleInfrastructure Automation at Scale
Infrastructure Automation at Scale
 
CollabSphere 2020 - NSF ODP Tooling
CollabSphere 2020 - NSF ODP ToolingCollabSphere 2020 - NSF ODP Tooling
CollabSphere 2020 - NSF ODP Tooling
 

Viewers also liked

Configuration as Code: The Job DSL Plugin
Configuration as Code: The Job DSL PluginConfiguration as Code: The Job DSL Plugin
Configuration as Code: The Job DSL Plugin
Daniel Spilker
 
Infinit filesystem, Reactor reloaded
Infinit filesystem, Reactor reloadedInfinit filesystem, Reactor reloaded
Infinit filesystem, Reactor reloaded
Infinit
 
Persistent storage tailored for containers #dockersummit
Persistent storage tailored for containers #dockersummitPersistent storage tailored for containers #dockersummit
Persistent storage tailored for containers #dockersummit
Infinit
 
Docker volume plugins and Infinit – Mini-conf Docker Paris #1
Docker volume plugins and Infinit – Mini-conf Docker Paris #1Docker volume plugins and Infinit – Mini-conf Docker Paris #1
Docker volume plugins and Infinit – Mini-conf Docker Paris #1
Infinit
 
Writing a Jenkins / Hudson plugin
Writing a Jenkins / Hudson pluginWriting a Jenkins / Hudson plugin
Writing a Jenkins / Hudson plugin
Anthony Dahanne
 
Historia insp alvaro bello
Historia insp alvaro belloHistoria insp alvaro bello
Historia insp alvaro bello
antonio leal
 
データベース技術 9(Database 9)
データベース技術 9(Database 9)データベース技術 9(Database 9)
データベース技術 9(Database 9)
Yuka Obu
 
Hpm100615
Hpm100615Hpm100615
Hpm100615
Philip Bourne
 
lecture 1 content
lecture 1 contentlecture 1 content
lecture 1 content
Cleveland Community College
 
Working from the bottom of the backlog - 1% day
Working from the bottom of the backlog - 1% dayWorking from the bottom of the backlog - 1% day
Working from the bottom of the backlog - 1% day
Priyanka Bhasin
 
Top 30 Most Interactive Tech Blogs
Top 30 Most Interactive Tech BlogsTop 30 Most Interactive Tech Blogs
Top 30 Most Interactive Tech Blogs
Brand24
 
The Los Angeles Area Fashion Industry Profile
The Los Angeles Area Fashion Industry ProfileThe Los Angeles Area Fashion Industry Profile
The Los Angeles Area Fashion Industry Profile
CIT Group
 
Twitter Lists Made Social with Listly [infographic]
Twitter Lists Made Social with Listly [infographic]Twitter Lists Made Social with Listly [infographic]
Twitter Lists Made Social with Listly [infographic]
Nick Kellet
 

Viewers also liked (14)

Configuration as Code: The Job DSL Plugin
Configuration as Code: The Job DSL PluginConfiguration as Code: The Job DSL Plugin
Configuration as Code: The Job DSL Plugin
 
Infinit filesystem, Reactor reloaded
Infinit filesystem, Reactor reloadedInfinit filesystem, Reactor reloaded
Infinit filesystem, Reactor reloaded
 
Persistent storage tailored for containers #dockersummit
Persistent storage tailored for containers #dockersummitPersistent storage tailored for containers #dockersummit
Persistent storage tailored for containers #dockersummit
 
Docker volume plugins and Infinit – Mini-conf Docker Paris #1
Docker volume plugins and Infinit – Mini-conf Docker Paris #1Docker volume plugins and Infinit – Mini-conf Docker Paris #1
Docker volume plugins and Infinit – Mini-conf Docker Paris #1
 
Writing a Jenkins / Hudson plugin
Writing a Jenkins / Hudson pluginWriting a Jenkins / Hudson plugin
Writing a Jenkins / Hudson plugin
 
Historia insp alvaro bello
Historia insp alvaro belloHistoria insp alvaro bello
Historia insp alvaro bello
 
データベース技術 9(Database 9)
データベース技術 9(Database 9)データベース技術 9(Database 9)
データベース技術 9(Database 9)
 
Hpm100615
Hpm100615Hpm100615
Hpm100615
 
lecture 1 content
lecture 1 contentlecture 1 content
lecture 1 content
 
Working from the bottom of the backlog - 1% day
Working from the bottom of the backlog - 1% dayWorking from the bottom of the backlog - 1% day
Working from the bottom of the backlog - 1% day
 
Top 30 Most Interactive Tech Blogs
Top 30 Most Interactive Tech BlogsTop 30 Most Interactive Tech Blogs
Top 30 Most Interactive Tech Blogs
 
The Los Angeles Area Fashion Industry Profile
The Los Angeles Area Fashion Industry ProfileThe Los Angeles Area Fashion Industry Profile
The Los Angeles Area Fashion Industry Profile
 
Organizational culture (indo)
Organizational culture (indo)Organizational culture (indo)
Organizational culture (indo)
 
Twitter Lists Made Social with Listly [infographic]
Twitter Lists Made Social with Listly [infographic]Twitter Lists Made Social with Listly [infographic]
Twitter Lists Made Social with Listly [infographic]
 

Similar to Job DSL Plugin for Jenkins

Jenkins Pipelines
Jenkins PipelinesJenkins Pipelines
Jenkins Pipelines
Steffen Gebert
 
Ember addons, served three ways
Ember addons, served three waysEmber addons, served three ways
Ember addons, served three ways
Mike North
 
(Declarative) Jenkins Pipelines
(Declarative) Jenkins Pipelines(Declarative) Jenkins Pipelines
(Declarative) Jenkins Pipelines
Steffen Gebert
 
Take control of your Jenkins jobs via job DSL.
Take control of your Jenkins jobs via job DSL.Take control of your Jenkins jobs via job DSL.
Take control of your Jenkins jobs via job DSL.
Łukasz Proszek
 
Tech Talk: DevOps at LeanIX @ Startup Camp Berlin
Tech Talk: DevOps at LeanIX @ Startup Camp BerlinTech Talk: DevOps at LeanIX @ Startup Camp Berlin
Tech Talk: DevOps at LeanIX @ Startup Camp Berlin
LeanIX GmbH
 
JUC Europe 2015: Configuration as Code: The Job DSL Plugin
JUC Europe 2015: Configuration as Code: The Job DSL PluginJUC Europe 2015: Configuration as Code: The Job DSL Plugin
JUC Europe 2015: Configuration as Code: The Job DSL Plugin
CloudBees
 
Jenkins days workshop pipelines - Eric Long
Jenkins days workshop  pipelines - Eric LongJenkins days workshop  pipelines - Eric Long
Jenkins days workshop pipelines - Eric Long
ericlongtx
 
Gradle - From minutes to seconds: minimizing build times
Gradle - From minutes to seconds: minimizing build timesGradle - From minutes to seconds: minimizing build times
Gradle - From minutes to seconds: minimizing build times
Rene Gröschke
 
An introduction to maven gradle and sbt
An introduction to maven gradle and sbtAn introduction to maven gradle and sbt
An introduction to maven gradle and sbt
Fabio Fumarola
 
How to set up an ASP.NET 5 Continuous Delivery Pipeline using IBM Bluemix Dev...
How to set up an ASP.NET 5 Continuous Delivery Pipeline using IBM Bluemix Dev...How to set up an ASP.NET 5 Continuous Delivery Pipeline using IBM Bluemix Dev...
How to set up an ASP.NET 5 Continuous Delivery Pipeline using IBM Bluemix Dev...
Richard Johansson
 
Gradle
GradleGradle
Jenkins Days - Workshop - Let's Build a Pipeline - Los Angeles
Jenkins Days - Workshop - Let's Build a Pipeline - Los AngelesJenkins Days - Workshop - Let's Build a Pipeline - Los Angeles
Jenkins Days - Workshop - Let's Build a Pipeline - Los Angeles
Andy Pemberton
 
CI/CD Using Ansible and Jenkins for Infrastructure
CI/CD Using Ansible and Jenkins for InfrastructureCI/CD Using Ansible and Jenkins for Infrastructure
CI/CD Using Ansible and Jenkins for Infrastructure
Faisal Shaikh
 
Building production-quality apps with Node.js
Building production-quality apps with Node.jsBuilding production-quality apps with Node.js
Building production-quality apps with Node.js
mattpardee
 
An Open-Source Chef Cookbook CI/CD Implementation Using Jenkins Pipelines
An Open-Source Chef Cookbook CI/CD Implementation Using Jenkins PipelinesAn Open-Source Chef Cookbook CI/CD Implementation Using Jenkins Pipelines
An Open-Source Chef Cookbook CI/CD Implementation Using Jenkins Pipelines
Steffen Gebert
 
TYPO3 Camp Stuttgart 2015 - Continuous Delivery with Open Source Tools
TYPO3 Camp Stuttgart 2015 - Continuous Delivery with Open Source ToolsTYPO3 Camp Stuttgart 2015 - Continuous Delivery with Open Source Tools
TYPO3 Camp Stuttgart 2015 - Continuous Delivery with Open Source Tools
Michael Lihs
 
22nd Athens Big Data Meetup - 1st Talk - MLOps Workshop: The Full ML Lifecycl...
22nd Athens Big Data Meetup - 1st Talk - MLOps Workshop: The Full ML Lifecycl...22nd Athens Big Data Meetup - 1st Talk - MLOps Workshop: The Full ML Lifecycl...
22nd Athens Big Data Meetup - 1st Talk - MLOps Workshop: The Full ML Lifecycl...
Athens Big Data
 
What's new in Gradle 4.0
What's new in Gradle 4.0What's new in Gradle 4.0
What's new in Gradle 4.0
Eric Wendelin
 
Agile Swift
Agile SwiftAgile Swift
Agile Swift
Godfrey Nolan
 
Gitlab and Lingvokot
Gitlab and LingvokotGitlab and Lingvokot
Gitlab and Lingvokot
Lingvokot
 

Similar to Job DSL Plugin for Jenkins (20)

Jenkins Pipelines
Jenkins PipelinesJenkins Pipelines
Jenkins Pipelines
 
Ember addons, served three ways
Ember addons, served three waysEmber addons, served three ways
Ember addons, served three ways
 
(Declarative) Jenkins Pipelines
(Declarative) Jenkins Pipelines(Declarative) Jenkins Pipelines
(Declarative) Jenkins Pipelines
 
Take control of your Jenkins jobs via job DSL.
Take control of your Jenkins jobs via job DSL.Take control of your Jenkins jobs via job DSL.
Take control of your Jenkins jobs via job DSL.
 
Tech Talk: DevOps at LeanIX @ Startup Camp Berlin
Tech Talk: DevOps at LeanIX @ Startup Camp BerlinTech Talk: DevOps at LeanIX @ Startup Camp Berlin
Tech Talk: DevOps at LeanIX @ Startup Camp Berlin
 
JUC Europe 2015: Configuration as Code: The Job DSL Plugin
JUC Europe 2015: Configuration as Code: The Job DSL PluginJUC Europe 2015: Configuration as Code: The Job DSL Plugin
JUC Europe 2015: Configuration as Code: The Job DSL Plugin
 
Jenkins days workshop pipelines - Eric Long
Jenkins days workshop  pipelines - Eric LongJenkins days workshop  pipelines - Eric Long
Jenkins days workshop pipelines - Eric Long
 
Gradle - From minutes to seconds: minimizing build times
Gradle - From minutes to seconds: minimizing build timesGradle - From minutes to seconds: minimizing build times
Gradle - From minutes to seconds: minimizing build times
 
An introduction to maven gradle and sbt
An introduction to maven gradle and sbtAn introduction to maven gradle and sbt
An introduction to maven gradle and sbt
 
How to set up an ASP.NET 5 Continuous Delivery Pipeline using IBM Bluemix Dev...
How to set up an ASP.NET 5 Continuous Delivery Pipeline using IBM Bluemix Dev...How to set up an ASP.NET 5 Continuous Delivery Pipeline using IBM Bluemix Dev...
How to set up an ASP.NET 5 Continuous Delivery Pipeline using IBM Bluemix Dev...
 
Gradle
GradleGradle
Gradle
 
Jenkins Days - Workshop - Let's Build a Pipeline - Los Angeles
Jenkins Days - Workshop - Let's Build a Pipeline - Los AngelesJenkins Days - Workshop - Let's Build a Pipeline - Los Angeles
Jenkins Days - Workshop - Let's Build a Pipeline - Los Angeles
 
CI/CD Using Ansible and Jenkins for Infrastructure
CI/CD Using Ansible and Jenkins for InfrastructureCI/CD Using Ansible and Jenkins for Infrastructure
CI/CD Using Ansible and Jenkins for Infrastructure
 
Building production-quality apps with Node.js
Building production-quality apps with Node.jsBuilding production-quality apps with Node.js
Building production-quality apps with Node.js
 
An Open-Source Chef Cookbook CI/CD Implementation Using Jenkins Pipelines
An Open-Source Chef Cookbook CI/CD Implementation Using Jenkins PipelinesAn Open-Source Chef Cookbook CI/CD Implementation Using Jenkins Pipelines
An Open-Source Chef Cookbook CI/CD Implementation Using Jenkins Pipelines
 
TYPO3 Camp Stuttgart 2015 - Continuous Delivery with Open Source Tools
TYPO3 Camp Stuttgart 2015 - Continuous Delivery with Open Source ToolsTYPO3 Camp Stuttgart 2015 - Continuous Delivery with Open Source Tools
TYPO3 Camp Stuttgart 2015 - Continuous Delivery with Open Source Tools
 
22nd Athens Big Data Meetup - 1st Talk - MLOps Workshop: The Full ML Lifecycl...
22nd Athens Big Data Meetup - 1st Talk - MLOps Workshop: The Full ML Lifecycl...22nd Athens Big Data Meetup - 1st Talk - MLOps Workshop: The Full ML Lifecycl...
22nd Athens Big Data Meetup - 1st Talk - MLOps Workshop: The Full ML Lifecycl...
 
What's new in Gradle 4.0
What's new in Gradle 4.0What's new in Gradle 4.0
What's new in Gradle 4.0
 
Agile Swift
Agile SwiftAgile Swift
Agile Swift
 
Gitlab and Lingvokot
Gitlab and LingvokotGitlab and Lingvokot
Gitlab and Lingvokot
 

Recently uploaded

Providing Globus Services to Users of JASMIN for Environmental Data Analysis
Providing Globus Services to Users of JASMIN for Environmental Data AnalysisProviding Globus Services to Users of JASMIN for Environmental Data Analysis
Providing Globus Services to Users of JASMIN for Environmental Data Analysis
Globus
 
Essentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FMEEssentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FME
Safe Software
 
Globus Compute Introduction - GlobusWorld 2024
Globus Compute Introduction - GlobusWorld 2024Globus Compute Introduction - GlobusWorld 2024
Globus Compute Introduction - GlobusWorld 2024
Globus
 
GlobusWorld 2024 Opening Keynote session
GlobusWorld 2024 Opening Keynote sessionGlobusWorld 2024 Opening Keynote session
GlobusWorld 2024 Opening Keynote session
Globus
 
OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoam
OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoamOpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoam
OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoam
takuyayamamoto1800
 
How to Position Your Globus Data Portal for Success Ten Good Practices
How to Position Your Globus Data Portal for Success Ten Good PracticesHow to Position Your Globus Data Portal for Success Ten Good Practices
How to Position Your Globus Data Portal for Success Ten Good Practices
Globus
 
AI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI App
AI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI AppAI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI App
AI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI App
Google
 
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
Shahin Sheidaei
 
AI Pilot Review: The World’s First Virtual Assistant Marketing Suite
AI Pilot Review: The World’s First Virtual Assistant Marketing SuiteAI Pilot Review: The World’s First Virtual Assistant Marketing Suite
AI Pilot Review: The World’s First Virtual Assistant Marketing Suite
Google
 
Lecture 1 Introduction to games development
Lecture 1 Introduction to games developmentLecture 1 Introduction to games development
Lecture 1 Introduction to games development
abdulrafaychaudhry
 
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
Juraj Vysvader
 
A Sighting of filterA in Typelevel Rite of Passage
A Sighting of filterA in Typelevel Rite of PassageA Sighting of filterA in Typelevel Rite of Passage
A Sighting of filterA in Typelevel Rite of Passage
Philip Schwarz
 
Understanding Globus Data Transfers with NetSage
Understanding Globus Data Transfers with NetSageUnderstanding Globus Data Transfers with NetSage
Understanding Globus Data Transfers with NetSage
Globus
 
openEuler Case Study - The Journey to Supply Chain Security
openEuler Case Study - The Journey to Supply Chain SecurityopenEuler Case Study - The Journey to Supply Chain Security
openEuler Case Study - The Journey to Supply Chain Security
Shane Coughlan
 
First Steps with Globus Compute Multi-User Endpoints
First Steps with Globus Compute Multi-User EndpointsFirst Steps with Globus Compute Multi-User Endpoints
First Steps with Globus Compute Multi-User Endpoints
Globus
 
Cracking the code review at SpringIO 2024
Cracking the code review at SpringIO 2024Cracking the code review at SpringIO 2024
Cracking the code review at SpringIO 2024
Paco van Beckhoven
 
Text-Summarization-of-Breaking-News-Using-Fine-tuning-BART-Model.pptx
Text-Summarization-of-Breaking-News-Using-Fine-tuning-BART-Model.pptxText-Summarization-of-Breaking-News-Using-Fine-tuning-BART-Model.pptx
Text-Summarization-of-Breaking-News-Using-Fine-tuning-BART-Model.pptx
ShamsuddeenMuhammadA
 
May Marketo Masterclass, London MUG May 22 2024.pdf
May Marketo Masterclass, London MUG May 22 2024.pdfMay Marketo Masterclass, London MUG May 22 2024.pdf
May Marketo Masterclass, London MUG May 22 2024.pdf
Adele Miller
 
APIs for Browser Automation (MoT Meetup 2024)
APIs for Browser Automation (MoT Meetup 2024)APIs for Browser Automation (MoT Meetup 2024)
APIs for Browser Automation (MoT Meetup 2024)
Boni García
 
Enterprise Resource Planning System in Telangana
Enterprise Resource Planning System in TelanganaEnterprise Resource Planning System in Telangana
Enterprise Resource Planning System in Telangana
NYGGS Automation Suite
 

Recently uploaded (20)

Providing Globus Services to Users of JASMIN for Environmental Data Analysis
Providing Globus Services to Users of JASMIN for Environmental Data AnalysisProviding Globus Services to Users of JASMIN for Environmental Data Analysis
Providing Globus Services to Users of JASMIN for Environmental Data Analysis
 
Essentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FMEEssentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FME
 
Globus Compute Introduction - GlobusWorld 2024
Globus Compute Introduction - GlobusWorld 2024Globus Compute Introduction - GlobusWorld 2024
Globus Compute Introduction - GlobusWorld 2024
 
GlobusWorld 2024 Opening Keynote session
GlobusWorld 2024 Opening Keynote sessionGlobusWorld 2024 Opening Keynote session
GlobusWorld 2024 Opening Keynote session
 
OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoam
OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoamOpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoam
OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoam
 
How to Position Your Globus Data Portal for Success Ten Good Practices
How to Position Your Globus Data Portal for Success Ten Good PracticesHow to Position Your Globus Data Portal for Success Ten Good Practices
How to Position Your Globus Data Portal for Success Ten Good Practices
 
AI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI App
AI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI AppAI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI App
AI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI App
 
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
 
AI Pilot Review: The World’s First Virtual Assistant Marketing Suite
AI Pilot Review: The World’s First Virtual Assistant Marketing SuiteAI Pilot Review: The World’s First Virtual Assistant Marketing Suite
AI Pilot Review: The World’s First Virtual Assistant Marketing Suite
 
Lecture 1 Introduction to games development
Lecture 1 Introduction to games developmentLecture 1 Introduction to games development
Lecture 1 Introduction to games development
 
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
 
A Sighting of filterA in Typelevel Rite of Passage
A Sighting of filterA in Typelevel Rite of PassageA Sighting of filterA in Typelevel Rite of Passage
A Sighting of filterA in Typelevel Rite of Passage
 
Understanding Globus Data Transfers with NetSage
Understanding Globus Data Transfers with NetSageUnderstanding Globus Data Transfers with NetSage
Understanding Globus Data Transfers with NetSage
 
openEuler Case Study - The Journey to Supply Chain Security
openEuler Case Study - The Journey to Supply Chain SecurityopenEuler Case Study - The Journey to Supply Chain Security
openEuler Case Study - The Journey to Supply Chain Security
 
First Steps with Globus Compute Multi-User Endpoints
First Steps with Globus Compute Multi-User EndpointsFirst Steps with Globus Compute Multi-User Endpoints
First Steps with Globus Compute Multi-User Endpoints
 
Cracking the code review at SpringIO 2024
Cracking the code review at SpringIO 2024Cracking the code review at SpringIO 2024
Cracking the code review at SpringIO 2024
 
Text-Summarization-of-Breaking-News-Using-Fine-tuning-BART-Model.pptx
Text-Summarization-of-Breaking-News-Using-Fine-tuning-BART-Model.pptxText-Summarization-of-Breaking-News-Using-Fine-tuning-BART-Model.pptx
Text-Summarization-of-Breaking-News-Using-Fine-tuning-BART-Model.pptx
 
May Marketo Masterclass, London MUG May 22 2024.pdf
May Marketo Masterclass, London MUG May 22 2024.pdfMay Marketo Masterclass, London MUG May 22 2024.pdf
May Marketo Masterclass, London MUG May 22 2024.pdf
 
APIs for Browser Automation (MoT Meetup 2024)
APIs for Browser Automation (MoT Meetup 2024)APIs for Browser Automation (MoT Meetup 2024)
APIs for Browser Automation (MoT Meetup 2024)
 
Enterprise Resource Planning System in Telangana
Enterprise Resource Planning System in TelanganaEnterprise Resource Planning System in Telangana
Enterprise Resource Planning System in Telangana
 

Job DSL Plugin for Jenkins

  • 1. Manage your jobs with Job DSL Niels Bech Nielsen, 9consult nbn@nine.dk
  • 2. Services Public Services Professional Services Projects & DevOps Application Management Architecture Security Open Source
  • 3. 3 >sed –i s/bug/feature/g * >git commit -a -m ”Fixed” Happy Customer Continuous Integration X–Mas Pipeline One Button Deployment Circle of Software Development
  • 4. 4 How do you manage changes in your Pipelines? X ?
  • 5. 5 Project A How do you manage changes in your Pipelines? • Commit • Regression tests • Integration Tests • Q+A • Deployment Project B • Commit • Nightly Release • Regression tests • Q+A • Deployment Project C • Commit • Integration Tests • Test Deploy • Acceptance Tests • Q+A • Deployment
  • 6. 6 Options include • Template Project Plugin • Job Generator Plugin • Parameterized Build Plugin • … (your own homegrown solution or click-edit) • Job DSL Plugin
  • 7. 7 Configuration as Code • Treat your configuration as Code Versioned Simplified DRY • Job DSL provide a simple, intuitive Groovy DSL to create Jenkins jobs from scripts Generate all your jobs from a ’seed’ job Abstract utility functions Supports all Jenkins plugins through extension • NO MORE HTML EDITING
  • 8. 8 Photo Credits • Nerd – Stephanie Klocke • Happy Customer – VeganSoldier • Fujii and Pri – Marcelo Jorge Vieria • Jenkins without broken builds – Henrique Imbertti Jr • Antares Rocket Test Launch – NASA • Launch Button – Steven Depolo • Etsy Jenkins Cluster – Noah Sussman
  • 9. 9 Simple DSL example def project = 'nbn/griffon-maven-plugin' def branchApi = new URL("https://api.github.com/repos/${project}/branches") def branches = new groovy.json.JsonSlurper().parse(branchApi.newReader()) branches.each { def branchName = it.name job { name "${project}-${branchName}".replaceAll('/','-') scm { git("git://github.com/${project}.git", branchName) } steps { maven("test -Dproject.name=${project}/${branchName} ") } } } https://github.com/jenkinsci/job-dsl-plugin/wiki/Job-DSL-Commands
  • 10. 10 Utility Methods in Common Files import javaposse.jobdsl.dsl.Job public class Common { static def addNightlyScmTrigger(Job job) { job.with { triggers { scm('H 23 * * *') } } } } import Common def job = … Common.addNightlyScmTrigger(job)
  • 11. 11 Extending the project with custom XML ${project}/config.xml
  • 12. 12 Configure Project Node job { name "${project}-${branchName}".replaceAll('/','-') scm { git("git://github.com/${project}.git", branchName) } steps { maven("test -Dproject.name=${project}/${branchName} ") } configure { projectNode -> projectNode / publishers << "hudson.plugins.jdepend.JDependRecorder" { configuredJDependFile() } }
  • 13. 13 Monkey Patch • Add new features to job dsl entities Find existing ContextNode and add new method Import JDependContext job { name "${project}-${branchName}".replaceAll('/','-') scm { git("git://github.com/${project}.git", branchName) } publishers { jdepend() // Takes an optional string arg } }
  • 14. 14 Monkey Patching in a Static Block import javaposse.jobdsl.dsl.helpers.publisher.* public class JDependContext { static { PublisherContext.metaClass.jdepend = { String preGeneratedJDependFile = '' -> publisherNodes << new NodeBuilder(). "hudson.plugins.jdepend.JDependRecorder" { configuredJDependFile(preGeneratedJDependFile) } } }