SlideShare a Scribd company logo
1 of 38
Download to read offline
14.11.2018
Roman Pickl
Continuous Delivery with Jenkins
Pipelines (incl. Advanced Topics)
2© Elektrobit (EB) 2018 2
1. docker run -p 8080:8080 jenkinsci/blueocean (add –p 44444:44444 or any other port to try
the ssh linter)
2. Go to http://localhost:8080/
3. Unlock jenkins with initialpw from log file
4. Install suggested plugins (you may have to continue the process in case any plugins are
broken and update plugins later on)
5. Create admin user / or continue with admin and initalpw
6. Open http://localhost:8080/blue/pipelines
7. Generate new Pipeline with Github repository
8. Create Jenkinsfile (e.g. https://github.com/rompic/jenkinspipeline)
Demo
Continuous Delivery with Jenkins Pipelines (incl. Advanced Topics)
3© Elektrobit (EB) 2018
• Technical Project Manager @ Elektrobit
• Uses Jenkins since 2012
• Loves CI/CD/DevOps
• Here to learn
Roman Pickl (@rompic)
How did I end up here?
Continuous Delivery with Jenkins Pipelines (incl. Advanced Topics)
4© Elektrobit (EB) 2018
Jez Humble on Continuous Delivery(2012): https://www.youtube.com/watch?v=skLJuksCRTw
Automated implementation of your system’s build, deploy, test,
release process
• Every change results in a build
• Every build is a release candidate
• Delivery can be done at any time, on any environment
 Make releases a non-event
Deployment Pipeline provides:
• Visibility
• Feedback
• Control
Continuous Delivery (CD)
Continuous Delivery with Jenkins Pipelines (incl. Advanced Topics)
Read these books
if you want to
know more!
5© Elektrobit (EB) 2018
Jez Humble D. F., Continuous Delivery: Reliable Software Releases Through Build, Test, and Deployment Automation (2010)
Deployment Pipelines (Let’s build it with jenkins)
Continuous Delivery with Jenkins Pipelines (incl. Advanced Topics)
6© Elektrobit (EB) 2018
http://dduportal.github.io/presentations/mixit-2017-jenkins-pipeline/slides.html#/meet_jenkins
https://jenkins.io/blog/2017/04/05/say-hello-blueocean-1-0/
http://stats.jenkins.io/
• Created by Kohsuke Kawaguchi
• Initial Release 2005 (Hudson)
• Open Source (MIT License)
• Active and independent community (https://jenkins.io)
• 178,800 active installations
• 1,600+ plugins (!)
• Since 2.0 Pipelines (April 2016) are first class citizens
• Pipeline as Code (Jenkinsfile).
• New User Experience “Blue Ocean” with Blue Ocean Pipeline Editor
• Blue Ocean 1.9 released in October 2018
#1 Continuous Integration and Delivery Server
Jenkins
Continuous Delivery with Jenkins Pipelines (incl. Advanced Topics)
7© Elektrobit (EB) 2018
Welcome Blue Ocean!
Continuous Delivery with Jenkins Pipelines (incl. Advanced Topics)
8© Elektrobit (EB) 2018
4.Choose a repository
3. Choose organization
2. Provide access key
1. Type of source control
Create a Pipeline Wizard
Continuous Delivery with Jenkins Pipelines (incl. Advanced Topics)
9© Elektrobit (EB) 2018
https://jenkins.io/doc/book/pipeline/jenkinsfile/
Written in a Groovy DSL
“Jenkinsfile” in top level folder (different path possible since June
2017 https://issues.jenkins-ci.org/browse/JENKINS-34561)
Store in SCM (e.g. GIT) for additional benefits
• Code review/iteration
• Audit trail
• Single source of truth
Supports two syntaxes (can be mixed)
• Declarative pipelines (easier; “new”; 1.0 Feb 2017)
• Scripted pipelines (more powerful)
Jenkinsfile
Continuous Delivery with Jenkins Pipelines (incl. Advanced Topics)
10© Elektrobit (EB) 2018
https://jenkins.io/doc/book/pipeline/syntax/
Declarative PipelineScripted Pipelines
Continuous Delivery with Jenkins Pipelines (incl. Advanced Topics)
Scripted vs. Declarative
11© Elektrobit (EB) 2018
https://jenkins.io/doc/book/pipeline/syntax/
Declarative PipelineScripted Pipelines
Continuous Delivery with Jenkins Pipelines (incl. Advanced Topics)
Scripted vs. Declarative
• imperative programming model
• fully featured programming environment,
• higher flexibility and extensibility
• very few limits
 for power-users and more complex requirements
• declarative programming model
• simpler and more opinionated syntax for authoring Jenkins
Pipeline.
• Allows for validation and a visual editor
• limits what is available to the user
 ideal choice for simpler continuous delivery pipelines
Both
• use Groovy
• same Pipeline sub-system underneath
• mostly use same steps
• able to utilize Shared Libraries
 can be mixed using the script step
See https://jenkins.io/blog/2017/01/19/converting-conditional-to-pipeline/ for a more complex example of migrating a freestyle job to a
declarative/scripted pipeline.
12© Elektrobit (EB) 2018
https://jenkins.io/doc/book/pipeline/syntax/
• takes a block of Scripted Pipeline & executes that in the
Declarative Pipeline
• can provide a useful "escape hatch".
• script blocks of non-trivial size and/or complexity should be
moved into Shared Libraries
script Step
Continuous Delivery with Jenkins Pipelines (incl. Advanced Topics)
13© Elektrobit (EB) 2018
Settings
Continuous Delivery with Jenkins Pipelines (incl. Advanced Topics)
14© Elektrobit (EB) 2018
Stages
Continuous Delivery with Jenkins Pipelines (incl. Advanced Topics)
15© Elektrobit (EB) 2018
Parallel Execution
Continuous Delivery with Jenkins Pipelines (incl. Advanced Topics)
Declarative 1.3 (released 14.06.2018) allows you to add multiple
“sequential” stages in the same parallel branch.
See https://www.cloudbees.com/blog/whats-new-declarative-pipeline-
13-sequential-stages
16© Elektrobit (EB) 2018
Approval
Continuous Delivery with Jenkins Pipelines (incl. Advanced Topics)
Deploy to Live / Release omitted here
17© Elektrobit (EB) 2018
Post Build Notifications
Continuous Delivery with Jenkins Pipelines (incl. Advanced Topics)
18© Elektrobit (EB) 2018 18
https://wiki.jenkins.io/display/JENKINS/Blue+Ocean+Plugin
• Latest additions
– Support for sequential parallel stages
– Restartable Stages for declarative pipelines
– Performance improvements
Public roadmap
• https://jenkins.io/projects/blueocean/roadmap/
Blue Ocean 1.9 released 10.10.2018
Continuous Delivery with Jenkins Pipelines (incl. Advanced Topics)
19© Elektrobit (EB) 2018 19
Overview
Continuous Delivery with Jenkins Pipelines (incl. Advanced Topics)
20© Elektrobit (EB) 2018 20
Approval
Continuous Delivery with Jenkins Pipelines (incl. Advanced Topics)
21© Elektrobit (EB) 2018 21
Detail
Continuous Delivery with Jenkins Pipelines (incl. Advanced Topics)
22© Elektrobit (EB) 2018 22
Multi branch support
Continuous Delivery with Jenkins Pipelines (incl. Advanced Topics)
23© Elektrobit (EB) 2018 23
Multi branch (When)
Continuous Delivery with Jenkins Pipelines (incl. Advanced Topics)
24© Elektrobit (EB) 2018
• GitLab currently not supported (planned! https://issues.jenkins-ci.org/browse/JENKINS-43976)
• Workaround: http://localhost:8080/blue/organizations/jenkins/pipeline-editor/
• Ctrl-S / Cmd-S to open the load save dialog
Pipeline Editor
Continuous Delivery with Jenkins Pipelines (incl. Advanced Topics)
25© Elektrobit (EB) 2018 25© Elektrobit (EB) 2018 | Confidential
• Blue Ocean Pipeline Editor
• Snippet Generator
• Declarative Directive Generator
• Auto-Convert Freestyle Jobs to Jenkins Pipeline
• Replay Feature
• IntelliJ IDEA GDSL – Autocomplete
• Command-line Pipeline Linter
• Jenkins File Runner
• Shared Libraries
• Unit Testing Jenkins Pipelines
Pipeline Development and Advanced Tools
Continuous Delivery with Jenkins Pipelines (incl. Advanced Topics)
26© Elektrobit (EB) 2018
• http://localhost:8080/pipeline-syntax
Snippet generator
Continuous Delivery with Jenkins Pipelines (incl. Advanced Topics)
27© Elektrobit (EB) 2018
• http://localhost:8080/directive-generator/
• https://jenkins.io/blog/2018/04/09/whats-in-declarative/
Declarative Directive Generator
Continuous Delivery with Jenkins Pipelines (incl. Advanced Topics)
28© Elektrobit (EB) 2018
Plugin to automatically convert Freestyle Jobs to Jenkins Pipeline
https://jenkins.io/blog/2017/12/15/auto-convert-freestyle-jenkins-jobs-to-coded-pipeline/
https://wiki.jenkins.io/display/JENKINS/Convert+To+Pipeline+Plugin
Auto-Convert Freestyle Jobs to Jenkins Pipeline
Continuous Delivery with Jenkins Pipelines (incl. Advanced Topics)
29© Elektrobit (EB) 2018
• Allows for quick modifications and execution of an existing
(valid!) Pipeline without changing the Pipeline configuration or
creating a new commit.
• Once you are satisfied with the changes, you can use Replay to
view them again, copy them back to your Pipeline job or
Jenkinsfile, and then commit them using your usual engineering
processes
Replay Feature
Continuous Delivery with Jenkins Pipelines (incl. Advanced Topics)
30© Elektrobit (EB) 2018
See
https://st-g.de/2016/08/jenkins-pipeline-autocompletion-in-intellij
https://stackoverflow.com/questions/41062514/use-gdsl-file-in-a-java-project-in-intellij
https://stackoverflow.com/a/41149255/3165782
for setting it up.
• Auto completion of steps for scripted pipelines
• Install Groovy Plugin
• Download http://localhost:8080/pipeline-syntax/gdsl
• Add it as e.g. pipeline.gdsl to your projects src path
IntelliJ IDEA GDSL - Autocomplete
Continuous Delivery with Jenkins Pipelines (incl. Advanced Topics)
31© Elektrobit (EB) 2018
Validate Declarative Pipelines from the cli before actually running it/checking it in.
See https://jenkins.io/doc/book/pipeline/development/#linter for details. Remember to enable SSH access, expose a port on your
docker container and add ssh key to try this!
Command-line Pipeline Linter
Continuous Delivery with Jenkins Pipelines (incl. Advanced Topics)
32© Elektrobit (EB) 2018
https://github.com/jenkinsci/jenkinsfile-runner
Experiment to package Jenkins pipeline execution as a command
line tool.
Use cases include:
• Assist editing and testing Jenkinsfile locally
• Use Jenkins in Function-as-a-Service context
• Integration test shared libraries
• downloads latest Jenkins LTS
• installs plugins as defined by a plugins.txt file
• setup .jenkinsfile-runner directory
• runs Jenkins master headless
• run a single job based on a local Jenkinsfile, then shutdown on
completion.
So i guess we can run now run a job in jenkins which downloads jenkins to run a jenkins job …
jenkinsfile-runner
Continuous Delivery with Jenkins Pipelines (incl. Advanced Topics)
33© Elektrobit (EB) 2018
Share parts of Pipelines between various projects to reduce
redundancies and keep code "DRY“.
Functions can than be called from Jenkinsfiles.
See
https://jenkins.io/doc/book/pipeline/shared-libraries/
and
https://jenkins.io/blog/2017/10/02/pipeline-templates-with-
shared-libraries/
for more details.
Shared Libraries
Continuous Delivery with Jenkins Pipelines (incl. Advanced Topics)
34© Elektrobit (EB) 2018 34© Elektrobit (EB) 2018 | Confidential
• Allows to unit test Pipelines and Shared Libraries before running them in full
• Provides a mock execution environment that can be used to check for expected behavior
• Still quite rough around the edges. (e.g. no support for declarative pipeline yet
https://github.com/lesfurets/JenkinsPipelineUnit/pull/13)
• See:
• https://github.com/lesfurets/JenkinsPipelineUnit
• https://github.com/lesfurets/JenkinsPipelineUnit/blob/master/README.md
• https://issues.jenkins-ci.org/browse/JENKINS-33925
• Other approaches https://github.com/homeaway/jenkins-spock
Unit Testing Jenkins Pipelines
Continuous Delivery with Jenkins Pipelines (incl. Advanced Topics)
35© Elektrobit (EB) 2018
• Missing:
– Support for passing variables between stages in declarative pipelines (see workaround in https://issues.jenkins-ci.org/browse/JENKINS-41335 and
discussion in https://stackoverflow.com/questions/47462500/pass-variables-between-jenkins-stages and
https://stackoverflow.com/questions/43879733/jenkinsfile-declarative-pipeline-defining-dynamic-env-vars/43881731#43881731)
• To Come:
– More editor coverage of declaration syntax
– GitLab read/write support
– Jenkins Evergreen an automatically updating rolling distribution system for Jenkins - https://jenkins.io/projects/evergreen/
– For more see https://jenkins.io/projects/blueocean/roadmap/ and https://jenkins.io/blog/2018/08/31/shifting-gears/
Things missing / Things to come
Continuous Delivery with Jenkins Pipelines (incl. Advanced Topics)
36© Elektrobit (EB) 2018
• Website: https://jenkins.io
• Blog: https://jenkins.io/node/
• https://www.slideshare.net/legrimpeur/belgium-jenkins-area-meetup-jenkins-blueocean-and-declarative-pipelines
• Getting Started
• https://jenkins.io/doc/book/getting-started/
• https://jenkins.io/doc/book/pipeline/syntax/
• https://jenkins.io/doc/tutorials/
• https://jenkins.io/doc/pipeline/steps/
• https://jenkins.io/doc/book/blueocean/getting-started/
• https://github.com/jenkinsci/pipeline-model-definition-plugin/wiki/getting%20started
• https://jenkins.io/blog/2017/05/18/pipeline-dev-tools/
Further references & information I
Continuous Delivery with Jenkins Pipelines (incl. Advanced Topics)
37© Elektrobit (EB) 2018
Docker Files:
• https://github.com/jenkinsci/docker/blob/master/README.md
• https://hub.docker.com/r/jenkinsci/blueocean/
Further references & information II
Continuous Delivery with Jenkins Pipelines (incl. Advanced Topics)
Roman Pickl (@rompic)
roman.pickl@elektrobit.com
www.elektrobit.com
Get in touch!

More Related Content

What's hot

Subversion workshop
Subversion workshopSubversion workshop
Subversion workshopTrafeX
 
2017 jenkins world
2017 jenkins world2017 jenkins world
2017 jenkins worldBrent Laster
 
Upgrading Oracle SOA Suite 10g to 11g (whitepaper)
Upgrading Oracle SOA Suite 10g to 11g (whitepaper)Upgrading Oracle SOA Suite 10g to 11g (whitepaper)
Upgrading Oracle SOA Suite 10g to 11g (whitepaper)Revelation Technologies
 
CI/CD Pipeline as a Code using Jenkins 2
CI/CD Pipeline as a Code using Jenkins 2CI/CD Pipeline as a Code using Jenkins 2
CI/CD Pipeline as a Code using Jenkins 2Mayank Patel
 
Jenkins2 - Coding Continuous Delivery Pipelines
Jenkins2 - Coding Continuous Delivery PipelinesJenkins2 - Coding Continuous Delivery Pipelines
Jenkins2 - Coding Continuous Delivery PipelinesBrent Laster
 
Totalsvn Usage And Administration By Gopi
Totalsvn Usage And Administration By GopiTotalsvn Usage And Administration By Gopi
Totalsvn Usage And Administration By Gopigopinathkarangula
 
Introduction to Subversion and Google Project Hosting
Introduction to Subversion and Google Project HostingIntroduction to Subversion and Google Project Hosting
Introduction to Subversion and Google Project HostingPhilip Johnson
 
Third-Party Software Library Reuse : From Adoption to Migration
Third-Party Software Library Reuse : From Adoption to MigrationThird-Party Software Library Reuse : From Adoption to Migration
Third-Party Software Library Reuse : From Adoption to MigrationAli Ouni
 
Continuous Delivery Agiles 2014 Medellin
Continuous Delivery Agiles 2014 MedellinContinuous Delivery Agiles 2014 Medellin
Continuous Delivery Agiles 2014 MedellinDiego Garber
 
August OpenNTF Webinar - Git and GitHub Explained
August OpenNTF Webinar - Git and GitHub ExplainedAugust OpenNTF Webinar - Git and GitHub Explained
August OpenNTF Webinar - Git and GitHub ExplainedHoward Greenberg
 
Jenkins Declarative Pipelines 101
Jenkins Declarative Pipelines 101Jenkins Declarative Pipelines 101
Jenkins Declarative Pipelines 101Malcolm Groves
 
Advanced Git: Functionality and Features
Advanced Git: Functionality and FeaturesAdvanced Git: Functionality and Features
Advanced Git: Functionality and FeaturesBrent Laster
 
Triple E class DevOps with Hudson, Maven, Kokki/Multiconf and PyDev
Triple E class DevOps with Hudson, Maven, Kokki/Multiconf and PyDevTriple E class DevOps with Hudson, Maven, Kokki/Multiconf and PyDev
Triple E class DevOps with Hudson, Maven, Kokki/Multiconf and PyDevWerner Keil
 
Conflicting Advice on Git Usage Patterns & Their Implications
Conflicting Advice on Git Usage Patterns & Their ImplicationsConflicting Advice on Git Usage Patterns & Their Implications
Conflicting Advice on Git Usage Patterns & Their ImplicationsYoungSeok Yoon
 
Version Control & Git
Version Control & GitVersion Control & Git
Version Control & GitCraig Smith
 

What's hot (20)

Subversion workshop
Subversion workshopSubversion workshop
Subversion workshop
 
Jenkins pipeline as code
Jenkins pipeline as codeJenkins pipeline as code
Jenkins pipeline as code
 
2017 jenkins world
2017 jenkins world2017 jenkins world
2017 jenkins world
 
Upgrading Oracle SOA Suite 10g to 11g (whitepaper)
Upgrading Oracle SOA Suite 10g to 11g (whitepaper)Upgrading Oracle SOA Suite 10g to 11g (whitepaper)
Upgrading Oracle SOA Suite 10g to 11g (whitepaper)
 
CI/CD Pipeline as a Code using Jenkins 2
CI/CD Pipeline as a Code using Jenkins 2CI/CD Pipeline as a Code using Jenkins 2
CI/CD Pipeline as a Code using Jenkins 2
 
Jenkins2 - Coding Continuous Delivery Pipelines
Jenkins2 - Coding Continuous Delivery PipelinesJenkins2 - Coding Continuous Delivery Pipelines
Jenkins2 - Coding Continuous Delivery Pipelines
 
Working with Git
Working with GitWorking with Git
Working with Git
 
Subversion User Guide
Subversion User GuideSubversion User Guide
Subversion User Guide
 
MidSem
MidSemMidSem
MidSem
 
Totalsvn Usage And Administration By Gopi
Totalsvn Usage And Administration By GopiTotalsvn Usage And Administration By Gopi
Totalsvn Usage And Administration By Gopi
 
Mavenized RCP
Mavenized RCPMavenized RCP
Mavenized RCP
 
Introduction to Subversion and Google Project Hosting
Introduction to Subversion and Google Project HostingIntroduction to Subversion and Google Project Hosting
Introduction to Subversion and Google Project Hosting
 
Third-Party Software Library Reuse : From Adoption to Migration
Third-Party Software Library Reuse : From Adoption to MigrationThird-Party Software Library Reuse : From Adoption to Migration
Third-Party Software Library Reuse : From Adoption to Migration
 
Continuous Delivery Agiles 2014 Medellin
Continuous Delivery Agiles 2014 MedellinContinuous Delivery Agiles 2014 Medellin
Continuous Delivery Agiles 2014 Medellin
 
August OpenNTF Webinar - Git and GitHub Explained
August OpenNTF Webinar - Git and GitHub ExplainedAugust OpenNTF Webinar - Git and GitHub Explained
August OpenNTF Webinar - Git and GitHub Explained
 
Jenkins Declarative Pipelines 101
Jenkins Declarative Pipelines 101Jenkins Declarative Pipelines 101
Jenkins Declarative Pipelines 101
 
Advanced Git: Functionality and Features
Advanced Git: Functionality and FeaturesAdvanced Git: Functionality and Features
Advanced Git: Functionality and Features
 
Triple E class DevOps with Hudson, Maven, Kokki/Multiconf and PyDev
Triple E class DevOps with Hudson, Maven, Kokki/Multiconf and PyDevTriple E class DevOps with Hudson, Maven, Kokki/Multiconf and PyDev
Triple E class DevOps with Hudson, Maven, Kokki/Multiconf and PyDev
 
Conflicting Advice on Git Usage Patterns & Their Implications
Conflicting Advice on Git Usage Patterns & Their ImplicationsConflicting Advice on Git Usage Patterns & Their Implications
Conflicting Advice on Git Usage Patterns & Their Implications
 
Version Control & Git
Version Control & GitVersion Control & Git
Version Control & Git
 

Similar to Continuous delivery with jenkins pipelines @devops pro moscow

Continuous delivery with jenkins pipelines (@devfest Vienna)
Continuous delivery with jenkins pipelines (@devfest Vienna)Continuous delivery with jenkins pipelines (@devfest Vienna)
Continuous delivery with jenkins pipelines (@devfest Vienna)Roman Pickl
 
Implementing CI CD UiPath Using Jenkins Plugin
Implementing CI CD UiPath Using Jenkins PluginImplementing CI CD UiPath Using Jenkins Plugin
Implementing CI CD UiPath Using Jenkins PluginSatish Prasad
 
Continuous Delivery with Jenkins
Continuous Delivery with JenkinsContinuous Delivery with Jenkins
Continuous Delivery with JenkinsJadson Santos
 
Continuous Integration using Jenkins with Python
Continuous Integration using Jenkins with PythonContinuous Integration using Jenkins with Python
Continuous Integration using Jenkins with PythonInexture Solutions
 
SD DevOps Meet-up - Jenkins 2.0 and Pipeline-as-Code
SD DevOps Meet-up - Jenkins 2.0 and Pipeline-as-CodeSD DevOps Meet-up - Jenkins 2.0 and Pipeline-as-Code
SD DevOps Meet-up - Jenkins 2.0 and Pipeline-as-CodeBrian Dawson
 
Modernize deployment pipeline
Modernize deployment pipelineModernize deployment pipeline
Modernize deployment pipelineTakeshi Takizawa
 
Pipeline as code - new feature in Jenkins 2
Pipeline as code - new feature in Jenkins 2Pipeline as code - new feature in Jenkins 2
Pipeline as code - new feature in Jenkins 2Michal Ziarnik
 
Kubernetes 1.16 and rancher 2.3 enhancements
Kubernetes 1.16 and rancher 2.3 enhancementsKubernetes 1.16 and rancher 2.3 enhancements
Kubernetes 1.16 and rancher 2.3 enhancementsSaiyam Pathak
 
Continous Integration.pptx
Continous Integration.pptxContinous Integration.pptx
Continous Integration.pptxAnuj Sharma
 
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 PipelinesSteffen Gebert
 
The Latest Status of CE Workgroup Shared Embedded Linux Distribution Project
 The Latest Status of CE Workgroup Shared Embedded Linux Distribution Project The Latest Status of CE Workgroup Shared Embedded Linux Distribution Project
The Latest Status of CE Workgroup Shared Embedded Linux Distribution ProjectYoshitake Kobayashi
 
Continuous Delivery on Kubernetes Using Spinnaker
Continuous Delivery on Kubernetes Using SpinnakerContinuous Delivery on Kubernetes Using Spinnaker
Continuous Delivery on Kubernetes Using SpinnakerWSO2
 
Why so continuous
Why so continuousWhy so continuous
Why so continuousMax Lobur
 
Ordina Accelerator program 2019 - Jenkins blue ocean pipelines
Ordina Accelerator program 2019 - Jenkins blue ocean pipelinesOrdina Accelerator program 2019 - Jenkins blue ocean pipelines
Ordina Accelerator program 2019 - Jenkins blue ocean pipelinesBert Koorengevel
 
Jenkins as a Service - Code all the way down
Jenkins as a Service - Code all the way downJenkins as a Service - Code all the way down
Jenkins as a Service - Code all the way downSteve Mactaggart
 
Continuous Deployment of your Application @SpringOne
Continuous Deployment of your Application @SpringOneContinuous Deployment of your Application @SpringOne
Continuous Deployment of your Application @SpringOneciberkleid
 
Eclipse DemoCamp Bucharest 2014 - Continuous Integration Jenkins/Hudson
Eclipse DemoCamp Bucharest 2014 - Continuous Integration Jenkins/HudsonEclipse DemoCamp Bucharest 2014 - Continuous Integration Jenkins/Hudson
Eclipse DemoCamp Bucharest 2014 - Continuous Integration Jenkins/HudsonVladLica
 
Jenkins vs. AWS CodePipeline (AWS User Group Berlin)
Jenkins vs. AWS CodePipeline (AWS User Group Berlin)Jenkins vs. AWS CodePipeline (AWS User Group Berlin)
Jenkins vs. AWS CodePipeline (AWS User Group Berlin)Steffen Gebert
 

Similar to Continuous delivery with jenkins pipelines @devops pro moscow (20)

Continuous delivery with jenkins pipelines (@devfest Vienna)
Continuous delivery with jenkins pipelines (@devfest Vienna)Continuous delivery with jenkins pipelines (@devfest Vienna)
Continuous delivery with jenkins pipelines (@devfest Vienna)
 
Implementing CI CD UiPath Using Jenkins Plugin
Implementing CI CD UiPath Using Jenkins PluginImplementing CI CD UiPath Using Jenkins Plugin
Implementing CI CD UiPath Using Jenkins Plugin
 
Continuous Delivery with Jenkins
Continuous Delivery with JenkinsContinuous Delivery with Jenkins
Continuous Delivery with Jenkins
 
Continuous Integration using Jenkins with Python
Continuous Integration using Jenkins with PythonContinuous Integration using Jenkins with Python
Continuous Integration using Jenkins with Python
 
Basic Jenkins Guide.pptx
Basic Jenkins Guide.pptxBasic Jenkins Guide.pptx
Basic Jenkins Guide.pptx
 
SD DevOps Meet-up - Jenkins 2.0 and Pipeline-as-Code
SD DevOps Meet-up - Jenkins 2.0 and Pipeline-as-CodeSD DevOps Meet-up - Jenkins 2.0 and Pipeline-as-Code
SD DevOps Meet-up - Jenkins 2.0 and Pipeline-as-Code
 
Modernize deployment pipeline
Modernize deployment pipelineModernize deployment pipeline
Modernize deployment pipeline
 
Jenkins Pipelines
Jenkins PipelinesJenkins Pipelines
Jenkins Pipelines
 
Pipeline as code - new feature in Jenkins 2
Pipeline as code - new feature in Jenkins 2Pipeline as code - new feature in Jenkins 2
Pipeline as code - new feature in Jenkins 2
 
Kubernetes 1.16 and rancher 2.3 enhancements
Kubernetes 1.16 and rancher 2.3 enhancementsKubernetes 1.16 and rancher 2.3 enhancements
Kubernetes 1.16 and rancher 2.3 enhancements
 
Continous Integration.pptx
Continous Integration.pptxContinous Integration.pptx
Continous Integration.pptx
 
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
 
The Latest Status of CE Workgroup Shared Embedded Linux Distribution Project
 The Latest Status of CE Workgroup Shared Embedded Linux Distribution Project The Latest Status of CE Workgroup Shared Embedded Linux Distribution Project
The Latest Status of CE Workgroup Shared Embedded Linux Distribution Project
 
Continuous Delivery on Kubernetes Using Spinnaker
Continuous Delivery on Kubernetes Using SpinnakerContinuous Delivery on Kubernetes Using Spinnaker
Continuous Delivery on Kubernetes Using Spinnaker
 
Why so continuous
Why so continuousWhy so continuous
Why so continuous
 
Ordina Accelerator program 2019 - Jenkins blue ocean pipelines
Ordina Accelerator program 2019 - Jenkins blue ocean pipelinesOrdina Accelerator program 2019 - Jenkins blue ocean pipelines
Ordina Accelerator program 2019 - Jenkins blue ocean pipelines
 
Jenkins as a Service - Code all the way down
Jenkins as a Service - Code all the way downJenkins as a Service - Code all the way down
Jenkins as a Service - Code all the way down
 
Continuous Deployment of your Application @SpringOne
Continuous Deployment of your Application @SpringOneContinuous Deployment of your Application @SpringOne
Continuous Deployment of your Application @SpringOne
 
Eclipse DemoCamp Bucharest 2014 - Continuous Integration Jenkins/Hudson
Eclipse DemoCamp Bucharest 2014 - Continuous Integration Jenkins/HudsonEclipse DemoCamp Bucharest 2014 - Continuous Integration Jenkins/Hudson
Eclipse DemoCamp Bucharest 2014 - Continuous Integration Jenkins/Hudson
 
Jenkins vs. AWS CodePipeline (AWS User Group Berlin)
Jenkins vs. AWS CodePipeline (AWS User Group Berlin)Jenkins vs. AWS CodePipeline (AWS User Group Berlin)
Jenkins vs. AWS CodePipeline (AWS User Group Berlin)
 

More from Roman Pickl

Are we really moving faster? How visualizing flow changed the way we work
Are we really moving faster? How visualizing flow changed the way we workAre we really moving faster? How visualizing flow changed the way we work
Are we really moving faster? How visualizing flow changed the way we workRoman Pickl
 
Are we really moving faster? How visualizing flow changed the way we work
Are we really moving faster? How visualizing flow changed the way we workAre we really moving faster? How visualizing flow changed the way we work
Are we really moving faster? How visualizing flow changed the way we workRoman Pickl
 
Are we really moving faster? How visualizing flow changed the way we work
Are we really moving faster? How visualizing flow changed the way we workAre we really moving faster? How visualizing flow changed the way we work
Are we really moving faster? How visualizing flow changed the way we workRoman Pickl
 
Are we really moving faster? How visualizing flow changed the way we work - ...
Are we really moving faster? How visualizing flow changed the way we work -  ...Are we really moving faster? How visualizing flow changed the way we work -  ...
Are we really moving faster? How visualizing flow changed the way we work - ...Roman Pickl
 
Continuous Code Quality with the Sonar Ecosystem @GeeCON 2017 in Prague
Continuous Code Quality with the Sonar Ecosystem @GeeCON 2017 in PragueContinuous Code Quality with the Sonar Ecosystem @GeeCON 2017 in Prague
Continuous Code Quality with the Sonar Ecosystem @GeeCON 2017 in PragueRoman Pickl
 
Continuous delivery with jenkins pipelines incl. dev tools (@ Vienna DevOps &...
Continuous delivery with jenkins pipelines incl. dev tools (@ Vienna DevOps &...Continuous delivery with jenkins pipelines incl. dev tools (@ Vienna DevOps &...
Continuous delivery with jenkins pipelines incl. dev tools (@ Vienna DevOps &...Roman Pickl
 
Continuous delivery with jenkins pipelines (@WeAreDevelopers2017)
Continuous delivery with jenkins pipelines (@WeAreDevelopers2017)Continuous delivery with jenkins pipelines (@WeAreDevelopers2017)
Continuous delivery with jenkins pipelines (@WeAreDevelopers2017)Roman Pickl
 
Continuous Code Quality with the sonar ecosystem
Continuous Code Quality with the sonar ecosystemContinuous Code Quality with the sonar ecosystem
Continuous Code Quality with the sonar ecosystemRoman Pickl
 

More from Roman Pickl (8)

Are we really moving faster? How visualizing flow changed the way we work
Are we really moving faster? How visualizing flow changed the way we workAre we really moving faster? How visualizing flow changed the way we work
Are we really moving faster? How visualizing flow changed the way we work
 
Are we really moving faster? How visualizing flow changed the way we work
Are we really moving faster? How visualizing flow changed the way we workAre we really moving faster? How visualizing flow changed the way we work
Are we really moving faster? How visualizing flow changed the way we work
 
Are we really moving faster? How visualizing flow changed the way we work
Are we really moving faster? How visualizing flow changed the way we workAre we really moving faster? How visualizing flow changed the way we work
Are we really moving faster? How visualizing flow changed the way we work
 
Are we really moving faster? How visualizing flow changed the way we work - ...
Are we really moving faster? How visualizing flow changed the way we work -  ...Are we really moving faster? How visualizing flow changed the way we work -  ...
Are we really moving faster? How visualizing flow changed the way we work - ...
 
Continuous Code Quality with the Sonar Ecosystem @GeeCON 2017 in Prague
Continuous Code Quality with the Sonar Ecosystem @GeeCON 2017 in PragueContinuous Code Quality with the Sonar Ecosystem @GeeCON 2017 in Prague
Continuous Code Quality with the Sonar Ecosystem @GeeCON 2017 in Prague
 
Continuous delivery with jenkins pipelines incl. dev tools (@ Vienna DevOps &...
Continuous delivery with jenkins pipelines incl. dev tools (@ Vienna DevOps &...Continuous delivery with jenkins pipelines incl. dev tools (@ Vienna DevOps &...
Continuous delivery with jenkins pipelines incl. dev tools (@ Vienna DevOps &...
 
Continuous delivery with jenkins pipelines (@WeAreDevelopers2017)
Continuous delivery with jenkins pipelines (@WeAreDevelopers2017)Continuous delivery with jenkins pipelines (@WeAreDevelopers2017)
Continuous delivery with jenkins pipelines (@WeAreDevelopers2017)
 
Continuous Code Quality with the sonar ecosystem
Continuous Code Quality with the sonar ecosystemContinuous Code Quality with the sonar ecosystem
Continuous Code Quality with the sonar ecosystem
 

Recently uploaded

Boost Efficiency: Sabre API Integration Made Easy
Boost Efficiency: Sabre API Integration Made EasyBoost Efficiency: Sabre API Integration Made Easy
Boost Efficiency: Sabre API Integration Made Easymichealwillson701
 
Mobile App Development company Houston
Mobile  App  Development  company HoustonMobile  App  Development  company Houston
Mobile App Development company Houstonjennysmithusa549
 
If your code could speak, what would it tell you? Let GitHub Copilot Chat hel...
If your code could speak, what would it tell you? Let GitHub Copilot Chat hel...If your code could speak, what would it tell you? Let GitHub Copilot Chat hel...
If your code could speak, what would it tell you? Let GitHub Copilot Chat hel...Maxim Salnikov
 
CYBER SECURITY AND CYBER CRIME COMPLETE GUIDE.pLptx
CYBER SECURITY AND CYBER CRIME COMPLETE GUIDE.pLptxCYBER SECURITY AND CYBER CRIME COMPLETE GUIDE.pLptx
CYBER SECURITY AND CYBER CRIME COMPLETE GUIDE.pLptxBarakaMuyengi
 
openEuler Community Overview - a presentation showing the current scale
openEuler Community Overview - a presentation showing the current scaleopenEuler Community Overview - a presentation showing the current scale
openEuler Community Overview - a presentation showing the current scaleShane Coughlan
 
Technical improvements. Reasons. Methods. Estimations. CJ
Technical improvements.  Reasons. Methods. Estimations. CJTechnical improvements.  Reasons. Methods. Estimations. CJ
Technical improvements. Reasons. Methods. Estimations. CJpolinaucc
 
VuNet software organisation powerpoint deck
VuNet software organisation powerpoint deckVuNet software organisation powerpoint deck
VuNet software organisation powerpoint deckNaval Singh
 
Unlocking the Power of IoT: A comprehensive approach to real-time insights
Unlocking the Power of IoT: A comprehensive approach to real-time insightsUnlocking the Power of IoT: A comprehensive approach to real-time insights
Unlocking the Power of IoT: A comprehensive approach to real-time insightsconfluent
 
Mobile App Development process | Expert Tips
Mobile App Development process | Expert TipsMobile App Development process | Expert Tips
Mobile App Development process | Expert Tipsmichealwillson701
 
Leveling Up your Branding and Mastering MERN: Fullstack WebDev
Leveling Up your Branding and Mastering MERN: Fullstack WebDevLeveling Up your Branding and Mastering MERN: Fullstack WebDev
Leveling Up your Branding and Mastering MERN: Fullstack WebDevpmgdscunsri
 
MUT4SLX: Extensions for Mutation Testing of Stateflow Models
MUT4SLX: Extensions for Mutation Testing of Stateflow ModelsMUT4SLX: Extensions for Mutation Testing of Stateflow Models
MUT4SLX: Extensions for Mutation Testing of Stateflow ModelsUniversity of Antwerp
 
Large Scale Architecture -- The Unreasonable Effectiveness of Simplicity
Large Scale Architecture -- The Unreasonable Effectiveness of SimplicityLarge Scale Architecture -- The Unreasonable Effectiveness of Simplicity
Large Scale Architecture -- The Unreasonable Effectiveness of SimplicityRandy Shoup
 
Flutter the Future of Mobile App Development - 5 Crucial Reasons.pdf
Flutter the Future of Mobile App Development - 5 Crucial Reasons.pdfFlutter the Future of Mobile App Development - 5 Crucial Reasons.pdf
Flutter the Future of Mobile App Development - 5 Crucial Reasons.pdfMind IT Systems
 
Splashtop Enterprise Brochure - Remote Computer Access and Remote Support Sof...
Splashtop Enterprise Brochure - Remote Computer Access and Remote Support Sof...Splashtop Enterprise Brochure - Remote Computer Access and Remote Support Sof...
Splashtop Enterprise Brochure - Remote Computer Access and Remote Support Sof...Splashtop Inc
 
BusinessGPT - SECURITY AND GOVERNANCE FOR GENERATIVE AI.pptx
BusinessGPT  - SECURITY AND GOVERNANCE  FOR GENERATIVE AI.pptxBusinessGPT  - SECURITY AND GOVERNANCE  FOR GENERATIVE AI.pptx
BusinessGPT - SECURITY AND GOVERNANCE FOR GENERATIVE AI.pptxAGATSoftware
 
Revolutionize Your Field Service Management with FSM Grid
Revolutionize Your Field Service Management with FSM GridRevolutionize Your Field Service Management with FSM Grid
Revolutionize Your Field Service Management with FSM GridMathew Thomas
 
Practical Advice for FDA’s 510(k) Requirements.pdf
Practical Advice for FDA’s 510(k) Requirements.pdfPractical Advice for FDA’s 510(k) Requirements.pdf
Practical Advice for FDA’s 510(k) Requirements.pdfICS
 
BATbern52 Swisscom's Journey into Data Mesh
BATbern52 Swisscom's Journey into Data MeshBATbern52 Swisscom's Journey into Data Mesh
BATbern52 Swisscom's Journey into Data MeshBATbern
 
03.2024_North America VMUG Optimizing RevOps using the power of ChatGPT in Ma...
03.2024_North America VMUG Optimizing RevOps using the power of ChatGPT in Ma...03.2024_North America VMUG Optimizing RevOps using the power of ChatGPT in Ma...
03.2024_North America VMUG Optimizing RevOps using the power of ChatGPT in Ma...jackiepotts6
 
Building Generative AI-infused apps: what's possible and how to start
Building Generative AI-infused apps: what's possible and how to startBuilding Generative AI-infused apps: what's possible and how to start
Building Generative AI-infused apps: what's possible and how to startMaxim Salnikov
 

Recently uploaded (20)

Boost Efficiency: Sabre API Integration Made Easy
Boost Efficiency: Sabre API Integration Made EasyBoost Efficiency: Sabre API Integration Made Easy
Boost Efficiency: Sabre API Integration Made Easy
 
Mobile App Development company Houston
Mobile  App  Development  company HoustonMobile  App  Development  company Houston
Mobile App Development company Houston
 
If your code could speak, what would it tell you? Let GitHub Copilot Chat hel...
If your code could speak, what would it tell you? Let GitHub Copilot Chat hel...If your code could speak, what would it tell you? Let GitHub Copilot Chat hel...
If your code could speak, what would it tell you? Let GitHub Copilot Chat hel...
 
CYBER SECURITY AND CYBER CRIME COMPLETE GUIDE.pLptx
CYBER SECURITY AND CYBER CRIME COMPLETE GUIDE.pLptxCYBER SECURITY AND CYBER CRIME COMPLETE GUIDE.pLptx
CYBER SECURITY AND CYBER CRIME COMPLETE GUIDE.pLptx
 
openEuler Community Overview - a presentation showing the current scale
openEuler Community Overview - a presentation showing the current scaleopenEuler Community Overview - a presentation showing the current scale
openEuler Community Overview - a presentation showing the current scale
 
Technical improvements. Reasons. Methods. Estimations. CJ
Technical improvements.  Reasons. Methods. Estimations. CJTechnical improvements.  Reasons. Methods. Estimations. CJ
Technical improvements. Reasons. Methods. Estimations. CJ
 
VuNet software organisation powerpoint deck
VuNet software organisation powerpoint deckVuNet software organisation powerpoint deck
VuNet software organisation powerpoint deck
 
Unlocking the Power of IoT: A comprehensive approach to real-time insights
Unlocking the Power of IoT: A comprehensive approach to real-time insightsUnlocking the Power of IoT: A comprehensive approach to real-time insights
Unlocking the Power of IoT: A comprehensive approach to real-time insights
 
Mobile App Development process | Expert Tips
Mobile App Development process | Expert TipsMobile App Development process | Expert Tips
Mobile App Development process | Expert Tips
 
Leveling Up your Branding and Mastering MERN: Fullstack WebDev
Leveling Up your Branding and Mastering MERN: Fullstack WebDevLeveling Up your Branding and Mastering MERN: Fullstack WebDev
Leveling Up your Branding and Mastering MERN: Fullstack WebDev
 
MUT4SLX: Extensions for Mutation Testing of Stateflow Models
MUT4SLX: Extensions for Mutation Testing of Stateflow ModelsMUT4SLX: Extensions for Mutation Testing of Stateflow Models
MUT4SLX: Extensions for Mutation Testing of Stateflow Models
 
Large Scale Architecture -- The Unreasonable Effectiveness of Simplicity
Large Scale Architecture -- The Unreasonable Effectiveness of SimplicityLarge Scale Architecture -- The Unreasonable Effectiveness of Simplicity
Large Scale Architecture -- The Unreasonable Effectiveness of Simplicity
 
Flutter the Future of Mobile App Development - 5 Crucial Reasons.pdf
Flutter the Future of Mobile App Development - 5 Crucial Reasons.pdfFlutter the Future of Mobile App Development - 5 Crucial Reasons.pdf
Flutter the Future of Mobile App Development - 5 Crucial Reasons.pdf
 
Splashtop Enterprise Brochure - Remote Computer Access and Remote Support Sof...
Splashtop Enterprise Brochure - Remote Computer Access and Remote Support Sof...Splashtop Enterprise Brochure - Remote Computer Access and Remote Support Sof...
Splashtop Enterprise Brochure - Remote Computer Access and Remote Support Sof...
 
BusinessGPT - SECURITY AND GOVERNANCE FOR GENERATIVE AI.pptx
BusinessGPT  - SECURITY AND GOVERNANCE  FOR GENERATIVE AI.pptxBusinessGPT  - SECURITY AND GOVERNANCE  FOR GENERATIVE AI.pptx
BusinessGPT - SECURITY AND GOVERNANCE FOR GENERATIVE AI.pptx
 
Revolutionize Your Field Service Management with FSM Grid
Revolutionize Your Field Service Management with FSM GridRevolutionize Your Field Service Management with FSM Grid
Revolutionize Your Field Service Management with FSM Grid
 
Practical Advice for FDA’s 510(k) Requirements.pdf
Practical Advice for FDA’s 510(k) Requirements.pdfPractical Advice for FDA’s 510(k) Requirements.pdf
Practical Advice for FDA’s 510(k) Requirements.pdf
 
BATbern52 Swisscom's Journey into Data Mesh
BATbern52 Swisscom's Journey into Data MeshBATbern52 Swisscom's Journey into Data Mesh
BATbern52 Swisscom's Journey into Data Mesh
 
03.2024_North America VMUG Optimizing RevOps using the power of ChatGPT in Ma...
03.2024_North America VMUG Optimizing RevOps using the power of ChatGPT in Ma...03.2024_North America VMUG Optimizing RevOps using the power of ChatGPT in Ma...
03.2024_North America VMUG Optimizing RevOps using the power of ChatGPT in Ma...
 
Building Generative AI-infused apps: what's possible and how to start
Building Generative AI-infused apps: what's possible and how to startBuilding Generative AI-infused apps: what's possible and how to start
Building Generative AI-infused apps: what's possible and how to start
 

Continuous delivery with jenkins pipelines @devops pro moscow

  • 1. 14.11.2018 Roman Pickl Continuous Delivery with Jenkins Pipelines (incl. Advanced Topics)
  • 2. 2© Elektrobit (EB) 2018 2 1. docker run -p 8080:8080 jenkinsci/blueocean (add –p 44444:44444 or any other port to try the ssh linter) 2. Go to http://localhost:8080/ 3. Unlock jenkins with initialpw from log file 4. Install suggested plugins (you may have to continue the process in case any plugins are broken and update plugins later on) 5. Create admin user / or continue with admin and initalpw 6. Open http://localhost:8080/blue/pipelines 7. Generate new Pipeline with Github repository 8. Create Jenkinsfile (e.g. https://github.com/rompic/jenkinspipeline) Demo Continuous Delivery with Jenkins Pipelines (incl. Advanced Topics)
  • 3. 3© Elektrobit (EB) 2018 • Technical Project Manager @ Elektrobit • Uses Jenkins since 2012 • Loves CI/CD/DevOps • Here to learn Roman Pickl (@rompic) How did I end up here? Continuous Delivery with Jenkins Pipelines (incl. Advanced Topics)
  • 4. 4© Elektrobit (EB) 2018 Jez Humble on Continuous Delivery(2012): https://www.youtube.com/watch?v=skLJuksCRTw Automated implementation of your system’s build, deploy, test, release process • Every change results in a build • Every build is a release candidate • Delivery can be done at any time, on any environment  Make releases a non-event Deployment Pipeline provides: • Visibility • Feedback • Control Continuous Delivery (CD) Continuous Delivery with Jenkins Pipelines (incl. Advanced Topics) Read these books if you want to know more!
  • 5. 5© Elektrobit (EB) 2018 Jez Humble D. F., Continuous Delivery: Reliable Software Releases Through Build, Test, and Deployment Automation (2010) Deployment Pipelines (Let’s build it with jenkins) Continuous Delivery with Jenkins Pipelines (incl. Advanced Topics)
  • 6. 6© Elektrobit (EB) 2018 http://dduportal.github.io/presentations/mixit-2017-jenkins-pipeline/slides.html#/meet_jenkins https://jenkins.io/blog/2017/04/05/say-hello-blueocean-1-0/ http://stats.jenkins.io/ • Created by Kohsuke Kawaguchi • Initial Release 2005 (Hudson) • Open Source (MIT License) • Active and independent community (https://jenkins.io) • 178,800 active installations • 1,600+ plugins (!) • Since 2.0 Pipelines (April 2016) are first class citizens • Pipeline as Code (Jenkinsfile). • New User Experience “Blue Ocean” with Blue Ocean Pipeline Editor • Blue Ocean 1.9 released in October 2018 #1 Continuous Integration and Delivery Server Jenkins Continuous Delivery with Jenkins Pipelines (incl. Advanced Topics)
  • 7. 7© Elektrobit (EB) 2018 Welcome Blue Ocean! Continuous Delivery with Jenkins Pipelines (incl. Advanced Topics)
  • 8. 8© Elektrobit (EB) 2018 4.Choose a repository 3. Choose organization 2. Provide access key 1. Type of source control Create a Pipeline Wizard Continuous Delivery with Jenkins Pipelines (incl. Advanced Topics)
  • 9. 9© Elektrobit (EB) 2018 https://jenkins.io/doc/book/pipeline/jenkinsfile/ Written in a Groovy DSL “Jenkinsfile” in top level folder (different path possible since June 2017 https://issues.jenkins-ci.org/browse/JENKINS-34561) Store in SCM (e.g. GIT) for additional benefits • Code review/iteration • Audit trail • Single source of truth Supports two syntaxes (can be mixed) • Declarative pipelines (easier; “new”; 1.0 Feb 2017) • Scripted pipelines (more powerful) Jenkinsfile Continuous Delivery with Jenkins Pipelines (incl. Advanced Topics)
  • 10. 10© Elektrobit (EB) 2018 https://jenkins.io/doc/book/pipeline/syntax/ Declarative PipelineScripted Pipelines Continuous Delivery with Jenkins Pipelines (incl. Advanced Topics) Scripted vs. Declarative
  • 11. 11© Elektrobit (EB) 2018 https://jenkins.io/doc/book/pipeline/syntax/ Declarative PipelineScripted Pipelines Continuous Delivery with Jenkins Pipelines (incl. Advanced Topics) Scripted vs. Declarative • imperative programming model • fully featured programming environment, • higher flexibility and extensibility • very few limits  for power-users and more complex requirements • declarative programming model • simpler and more opinionated syntax for authoring Jenkins Pipeline. • Allows for validation and a visual editor • limits what is available to the user  ideal choice for simpler continuous delivery pipelines Both • use Groovy • same Pipeline sub-system underneath • mostly use same steps • able to utilize Shared Libraries  can be mixed using the script step See https://jenkins.io/blog/2017/01/19/converting-conditional-to-pipeline/ for a more complex example of migrating a freestyle job to a declarative/scripted pipeline.
  • 12. 12© Elektrobit (EB) 2018 https://jenkins.io/doc/book/pipeline/syntax/ • takes a block of Scripted Pipeline & executes that in the Declarative Pipeline • can provide a useful "escape hatch". • script blocks of non-trivial size and/or complexity should be moved into Shared Libraries script Step Continuous Delivery with Jenkins Pipelines (incl. Advanced Topics)
  • 13. 13© Elektrobit (EB) 2018 Settings Continuous Delivery with Jenkins Pipelines (incl. Advanced Topics)
  • 14. 14© Elektrobit (EB) 2018 Stages Continuous Delivery with Jenkins Pipelines (incl. Advanced Topics)
  • 15. 15© Elektrobit (EB) 2018 Parallel Execution Continuous Delivery with Jenkins Pipelines (incl. Advanced Topics) Declarative 1.3 (released 14.06.2018) allows you to add multiple “sequential” stages in the same parallel branch. See https://www.cloudbees.com/blog/whats-new-declarative-pipeline- 13-sequential-stages
  • 16. 16© Elektrobit (EB) 2018 Approval Continuous Delivery with Jenkins Pipelines (incl. Advanced Topics) Deploy to Live / Release omitted here
  • 17. 17© Elektrobit (EB) 2018 Post Build Notifications Continuous Delivery with Jenkins Pipelines (incl. Advanced Topics)
  • 18. 18© Elektrobit (EB) 2018 18 https://wiki.jenkins.io/display/JENKINS/Blue+Ocean+Plugin • Latest additions – Support for sequential parallel stages – Restartable Stages for declarative pipelines – Performance improvements Public roadmap • https://jenkins.io/projects/blueocean/roadmap/ Blue Ocean 1.9 released 10.10.2018 Continuous Delivery with Jenkins Pipelines (incl. Advanced Topics)
  • 19. 19© Elektrobit (EB) 2018 19 Overview Continuous Delivery with Jenkins Pipelines (incl. Advanced Topics)
  • 20. 20© Elektrobit (EB) 2018 20 Approval Continuous Delivery with Jenkins Pipelines (incl. Advanced Topics)
  • 21. 21© Elektrobit (EB) 2018 21 Detail Continuous Delivery with Jenkins Pipelines (incl. Advanced Topics)
  • 22. 22© Elektrobit (EB) 2018 22 Multi branch support Continuous Delivery with Jenkins Pipelines (incl. Advanced Topics)
  • 23. 23© Elektrobit (EB) 2018 23 Multi branch (When) Continuous Delivery with Jenkins Pipelines (incl. Advanced Topics)
  • 24. 24© Elektrobit (EB) 2018 • GitLab currently not supported (planned! https://issues.jenkins-ci.org/browse/JENKINS-43976) • Workaround: http://localhost:8080/blue/organizations/jenkins/pipeline-editor/ • Ctrl-S / Cmd-S to open the load save dialog Pipeline Editor Continuous Delivery with Jenkins Pipelines (incl. Advanced Topics)
  • 25. 25© Elektrobit (EB) 2018 25© Elektrobit (EB) 2018 | Confidential • Blue Ocean Pipeline Editor • Snippet Generator • Declarative Directive Generator • Auto-Convert Freestyle Jobs to Jenkins Pipeline • Replay Feature • IntelliJ IDEA GDSL – Autocomplete • Command-line Pipeline Linter • Jenkins File Runner • Shared Libraries • Unit Testing Jenkins Pipelines Pipeline Development and Advanced Tools Continuous Delivery with Jenkins Pipelines (incl. Advanced Topics)
  • 26. 26© Elektrobit (EB) 2018 • http://localhost:8080/pipeline-syntax Snippet generator Continuous Delivery with Jenkins Pipelines (incl. Advanced Topics)
  • 27. 27© Elektrobit (EB) 2018 • http://localhost:8080/directive-generator/ • https://jenkins.io/blog/2018/04/09/whats-in-declarative/ Declarative Directive Generator Continuous Delivery with Jenkins Pipelines (incl. Advanced Topics)
  • 28. 28© Elektrobit (EB) 2018 Plugin to automatically convert Freestyle Jobs to Jenkins Pipeline https://jenkins.io/blog/2017/12/15/auto-convert-freestyle-jenkins-jobs-to-coded-pipeline/ https://wiki.jenkins.io/display/JENKINS/Convert+To+Pipeline+Plugin Auto-Convert Freestyle Jobs to Jenkins Pipeline Continuous Delivery with Jenkins Pipelines (incl. Advanced Topics)
  • 29. 29© Elektrobit (EB) 2018 • Allows for quick modifications and execution of an existing (valid!) Pipeline without changing the Pipeline configuration or creating a new commit. • Once you are satisfied with the changes, you can use Replay to view them again, copy them back to your Pipeline job or Jenkinsfile, and then commit them using your usual engineering processes Replay Feature Continuous Delivery with Jenkins Pipelines (incl. Advanced Topics)
  • 30. 30© Elektrobit (EB) 2018 See https://st-g.de/2016/08/jenkins-pipeline-autocompletion-in-intellij https://stackoverflow.com/questions/41062514/use-gdsl-file-in-a-java-project-in-intellij https://stackoverflow.com/a/41149255/3165782 for setting it up. • Auto completion of steps for scripted pipelines • Install Groovy Plugin • Download http://localhost:8080/pipeline-syntax/gdsl • Add it as e.g. pipeline.gdsl to your projects src path IntelliJ IDEA GDSL - Autocomplete Continuous Delivery with Jenkins Pipelines (incl. Advanced Topics)
  • 31. 31© Elektrobit (EB) 2018 Validate Declarative Pipelines from the cli before actually running it/checking it in. See https://jenkins.io/doc/book/pipeline/development/#linter for details. Remember to enable SSH access, expose a port on your docker container and add ssh key to try this! Command-line Pipeline Linter Continuous Delivery with Jenkins Pipelines (incl. Advanced Topics)
  • 32. 32© Elektrobit (EB) 2018 https://github.com/jenkinsci/jenkinsfile-runner Experiment to package Jenkins pipeline execution as a command line tool. Use cases include: • Assist editing and testing Jenkinsfile locally • Use Jenkins in Function-as-a-Service context • Integration test shared libraries • downloads latest Jenkins LTS • installs plugins as defined by a plugins.txt file • setup .jenkinsfile-runner directory • runs Jenkins master headless • run a single job based on a local Jenkinsfile, then shutdown on completion. So i guess we can run now run a job in jenkins which downloads jenkins to run a jenkins job … jenkinsfile-runner Continuous Delivery with Jenkins Pipelines (incl. Advanced Topics)
  • 33. 33© Elektrobit (EB) 2018 Share parts of Pipelines between various projects to reduce redundancies and keep code "DRY“. Functions can than be called from Jenkinsfiles. See https://jenkins.io/doc/book/pipeline/shared-libraries/ and https://jenkins.io/blog/2017/10/02/pipeline-templates-with- shared-libraries/ for more details. Shared Libraries Continuous Delivery with Jenkins Pipelines (incl. Advanced Topics)
  • 34. 34© Elektrobit (EB) 2018 34© Elektrobit (EB) 2018 | Confidential • Allows to unit test Pipelines and Shared Libraries before running them in full • Provides a mock execution environment that can be used to check for expected behavior • Still quite rough around the edges. (e.g. no support for declarative pipeline yet https://github.com/lesfurets/JenkinsPipelineUnit/pull/13) • See: • https://github.com/lesfurets/JenkinsPipelineUnit • https://github.com/lesfurets/JenkinsPipelineUnit/blob/master/README.md • https://issues.jenkins-ci.org/browse/JENKINS-33925 • Other approaches https://github.com/homeaway/jenkins-spock Unit Testing Jenkins Pipelines Continuous Delivery with Jenkins Pipelines (incl. Advanced Topics)
  • 35. 35© Elektrobit (EB) 2018 • Missing: – Support for passing variables between stages in declarative pipelines (see workaround in https://issues.jenkins-ci.org/browse/JENKINS-41335 and discussion in https://stackoverflow.com/questions/47462500/pass-variables-between-jenkins-stages and https://stackoverflow.com/questions/43879733/jenkinsfile-declarative-pipeline-defining-dynamic-env-vars/43881731#43881731) • To Come: – More editor coverage of declaration syntax – GitLab read/write support – Jenkins Evergreen an automatically updating rolling distribution system for Jenkins - https://jenkins.io/projects/evergreen/ – For more see https://jenkins.io/projects/blueocean/roadmap/ and https://jenkins.io/blog/2018/08/31/shifting-gears/ Things missing / Things to come Continuous Delivery with Jenkins Pipelines (incl. Advanced Topics)
  • 36. 36© Elektrobit (EB) 2018 • Website: https://jenkins.io • Blog: https://jenkins.io/node/ • https://www.slideshare.net/legrimpeur/belgium-jenkins-area-meetup-jenkins-blueocean-and-declarative-pipelines • Getting Started • https://jenkins.io/doc/book/getting-started/ • https://jenkins.io/doc/book/pipeline/syntax/ • https://jenkins.io/doc/tutorials/ • https://jenkins.io/doc/pipeline/steps/ • https://jenkins.io/doc/book/blueocean/getting-started/ • https://github.com/jenkinsci/pipeline-model-definition-plugin/wiki/getting%20started • https://jenkins.io/blog/2017/05/18/pipeline-dev-tools/ Further references & information I Continuous Delivery with Jenkins Pipelines (incl. Advanced Topics)
  • 37. 37© Elektrobit (EB) 2018 Docker Files: • https://github.com/jenkinsci/docker/blob/master/README.md • https://hub.docker.com/r/jenkinsci/blueocean/ Further references & information II Continuous Delivery with Jenkins Pipelines (incl. Advanced Topics)