SlideShare una empresa de Scribd logo
1 de 36
Descargar para leer sin conexión
© 2017 Copyright Fluidtime Data Services GmbH | www.fluidtime.com
Continuous Delivery with Jenkins Pipelines (incl.
Advanced Topics)
Roman Pickl
© 2017 Copyright Fluidtime Data Services GmbH | www.fluidtime.com
• 10+ years’ experience in integrating
transport systems
• 22 mobility Apps in the stores
• 43+ million requests / month
• 500.000+ unique users / month
At a glance
qando
Vienna, Linz, Graz,
Salzburg, Klagenfurt.
SMILE
Lighthouse project for
integrated mobility
Wien Mobil Lab
Vienna
FluidHub
Powering the Integrated Mobility and MaaS Ecosystem
2009
avv connect
Aachen Region, North
Rhine-Westphalia.
2014
NUMO
Vienna
2012 2015 2016
© 2017 Copyright Fluidtime Data Services GmbH | www.fluidtime.com
How did I end up here?
• Roman Pickl (@rompic)
• CTO @ Fluidtime
• In charge of the technical development
• Uses Jenkins since 2012
• Loves CI/CD/DevOps
• Here to learn
© 2017 Copyright Fluidtime Data Services GmbH | www.fluidtime.com
Continuous Delivery (CD)
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
Read these books!
Jez Humble on Continuous Delivery(2012): https://www.youtube.com/watch?v=skLJuksCRTw
© 2017 Copyright Fluidtime Data Services GmbH | www.fluidtime.com
Deployment Pipelines (Let’s build it with jenkins)
(Jez Humble D. F., Continuous Delivery: Reliable Software Releases Through Build, Test, and Deployment Automation, 2010)
© 2017 Copyright Fluidtime Data Services GmbH | www.fluidtime.com
Jenkins
#1 Continuous Integration and Delivery server
•Created by Kohsuke Kawaguchi
•Initial Release 2005 (Hudson)
•Open Source (MIT License)
•Active and independent community (https://jenkins.io)
•155,000 active installations
•1,500+ 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
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/
© 2017 Copyright Fluidtime Data Services GmbH | www.fluidtime.com
Welcome Blue Ocean!
© 2017 Copyright Fluidtime Data Services GmbH | www.fluidtime.com
Create a Pipeline Wizard
© 2017 Copyright Fluidtime Data Services GmbH | www.fluidtime.com
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)
https://jenkins.io/doc/book/pipeline/jenkinsfile/
© 2017 Copyright Fluidtime Data Services GmbH | www.fluidtime.com
Scripted vs. Declarative
Scripted Pipelines: Declarative Pipeline:
https://jenkins.io/doc/book/pipeline/syntax/
© 2017 Copyright Fluidtime Data Services GmbH | www.fluidtime.com
Scripted vs. Declarative
Scripted Pipeline: Declarative Pipeline:
https://jenkins.io/doc/book/pipeline/syntax/
• 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
pipelinesBoth:
• 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.
© 2017 Copyright Fluidtime Data Services GmbH | www.fluidtime.com
script Step
• 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
https://jenkins.io/doc/book/pipeline/syntax/
© 2017 Copyright Fluidtime Data Services GmbH | www.fluidtime.com
Settings
© 2017 Copyright Fluidtime Data Services GmbH | www.fluidtime.com
Stages
© 2017 Copyright Fluidtime Data Services GmbH | www.fluidtime.com
Parallel Execution
With
declarative1.2
© 2017 Copyright Fluidtime Data Services GmbH | www.fluidtime.com
Approval
...
Deploy to Stage, Deploy Live, Release omitted here
© 2017 Copyright Fluidtime Data Services GmbH | www.fluidtime.com
Post Build Notifications
© 2017 Copyright Fluidtime Data Services GmbH | www.fluidtime.com
Demo
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)
© 2017 Copyright Fluidtime Data Services GmbH | www.fluidtime.com
Blue Ocean 1.3.3 released 16.11.2017
• https://wiki.jenkins.io/display/JENKINS/Blue+Ocean+Plugin
• Latest additions
• JIRA integration
• Declarative Pipeline version 1.2 support
• Support of different Repositories
Public roadmap
https://jenkins.io/projects/blueocean/roadmap/
© 2017 Copyright Fluidtime Data Services GmbH | www.fluidtime.com
Overview
© 2017 Copyright Fluidtime Data Services GmbH | www.fluidtime.com
Approval
© 2017 Copyright Fluidtime Data Services GmbH | www.fluidtime.com
Detail
© 2017 Copyright Fluidtime Data Services GmbH | www.fluidtime.com
Multi branch support
© 2017 Copyright Fluidtime Data Services GmbH | www.fluidtime.com
Multi branch (When)
© 2017 Copyright Fluidtime Data Services GmbH | www.fluidtime.com
Pipeline Development and Advanced Tools
• Blue Ocean Pipeline Editor
• Snippet Generator
• IntelliJ IDEA GDSL – Autocomplete
• Command-line Pipeline Linter
• Replay Feature
• Unit Testing Jenkins Pipelines
• Shared Libaries
https://jenkins.io/doc/book/pipeline/development/
https://jenkins.io/doc/book/pipeline/shared-libraries/
© 2017 Copyright Fluidtime Data Services GmbH | www.fluidtime.com
Pipeline Editor
GitLab currently not supported (planned! https://issues.jenkins-ci.org/browse/JENKINS-43148)
Workaround: http://localhost:8080/blue/organizations/jenkins/pipeline-editor/
Ctrl-S / Cmd-S to open the load save dialog
© 2017 Copyright Fluidtime Data Services GmbH | www.fluidtime.com
Snippet generator
http://localhost:8080/pipeline-syntax
https://jenkins.io/doc/book/pipeline/getting-started/#snippet-generator
© 2017 Copyright Fluidtime Data Services GmbH | www.fluidtime.com
IntelliJ IDEA GDSL - Autocomplete
• Autocompletion 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
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.
© 2017 Copyright Fluidtime Data Services GmbH | www.fluidtime.com
Command-line Pipeline Linter
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!
© 2017 Copyright Fluidtime Data Services GmbH | www.fluidtime.com
Replay Feature
• 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
https://jenkins.io/doc/book/pipeline/development/
© 2017 Copyright Fluidtime Data Services GmbH | www.fluidtime.com
Shared Libraries
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/shar
ed-libraries/
and
https://jenkins.io/blog/2017/10/02/pipe
line-templates-with-shared-libraries/
for more details.
© 2017 Copyright Fluidtime Data Services GmbH | www.fluidtime.com
Unit Testing Jenkins Pipelines
•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
© 2017 Copyright Fluidtime Data Services GmbH | www.fluidtime.com
Things missing / Things to come
Missing:
• Support for definition of variables in declarative pipelines (see workaround in
https://issues.jenkins-ci.org/browse/JENKINS-41335)
• Keep build forever (https://issues.jenkins-ci.org/browse/JENKINS-39028 ;
workaround via shared lib)
• Restart stages for pipelines (checkpoint as commercial feature, https://issues.jenkins-
ci.org/browse/JENKINS-33846 ; feature for declarative pipelines planned:
https://issues.jenkins-ci.org/browse/JENKINS-45455 )
To Come:
• Multiple jenkins files
• More editor coverage of declaration syntax
• jenkins pipeline support for changelog and changesets with when keyword
• GitLab read/write support
• ...
© 2017 Copyright Fluidtime Data Services GmbH | www.fluidtime.com
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/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
© 2017 Copyright Fluidtime Data Services GmbH | www.fluidtime.com
Docker Files:
https://github.com/jenkinsci/docker/blob/master/README.md
https://hub.docker.com/r/jenkinsci/blueocean/
Further references & information II
© 2017 Copyright Fluidtime Data Services GmbH | www.fluidtime.com
Contact
Roman Pickl (@rompic)
roman.pickl@fluidtime.com
Fluidtime Data Services GmbH
Neubaugasse 12-14/25
A–1070 Wien
Tel +43 (0)1 5860 180
www.fluidtime.com

Más contenido relacionado

La actualidad más candente

DevOps Tutorial For Beginners | DevOps Tutorial | DevOps Tools | DevOps Train...
DevOps Tutorial For Beginners | DevOps Tutorial | DevOps Tools | DevOps Train...DevOps Tutorial For Beginners | DevOps Tutorial | DevOps Tools | DevOps Train...
DevOps Tutorial For Beginners | DevOps Tutorial | DevOps Tools | DevOps Train...Simplilearn
 
#ATAGTR2019 Presentation "DevSecOps with GitLab" By Avishkar Nikale
#ATAGTR2019 Presentation "DevSecOps with GitLab" By Avishkar Nikale#ATAGTR2019 Presentation "DevSecOps with GitLab" By Avishkar Nikale
#ATAGTR2019 Presentation "DevSecOps with GitLab" By Avishkar NikaleAgile Testing Alliance
 
Selenium test automation
Selenium test automationSelenium test automation
Selenium test automationSrikanth Vuriti
 
Continuous Delivery, Continuous Integration
Continuous Delivery, Continuous Integration Continuous Delivery, Continuous Integration
Continuous Delivery, Continuous Integration Amazon Web Services
 
CI/CD Best Practices for Building Modern Applications - MAD302 - Anaheim AWS ...
CI/CD Best Practices for Building Modern Applications - MAD302 - Anaheim AWS ...CI/CD Best Practices for Building Modern Applications - MAD302 - Anaheim AWS ...
CI/CD Best Practices for Building Modern Applications - MAD302 - Anaheim AWS ...Amazon Web Services
 
Ansible Automation to Rule Them All
Ansible Automation to Rule Them AllAnsible Automation to Rule Them All
Ansible Automation to Rule Them AllTim Fairweather
 
Cypress report
Cypress reportCypress report
Cypress reportAdarsh
 
CI/CD Best Practices for Your DevOps Journey
CI/CD Best  Practices for Your DevOps JourneyCI/CD Best  Practices for Your DevOps Journey
CI/CD Best Practices for Your DevOps JourneyDevOps.com
 
Selenium Maven With Eclipse | Edureka
Selenium Maven With Eclipse | EdurekaSelenium Maven With Eclipse | Edureka
Selenium Maven With Eclipse | EdurekaEdureka!
 
Shift Deployment Security Left with Weave GitOps & Upbound’s Universal Crossp...
Shift Deployment Security Left with Weave GitOps & Upbound’s Universal Crossp...Shift Deployment Security Left with Weave GitOps & Upbound’s Universal Crossp...
Shift Deployment Security Left with Weave GitOps & Upbound’s Universal Crossp...Weaveworks
 
An Introduction to Maven
An Introduction to MavenAn Introduction to Maven
An Introduction to MavenVadym Lotar
 

La actualidad más candente (20)

DevOps Tutorial For Beginners | DevOps Tutorial | DevOps Tools | DevOps Train...
DevOps Tutorial For Beginners | DevOps Tutorial | DevOps Tools | DevOps Train...DevOps Tutorial For Beginners | DevOps Tutorial | DevOps Tools | DevOps Train...
DevOps Tutorial For Beginners | DevOps Tutorial | DevOps Tools | DevOps Train...
 
#ATAGTR2019 Presentation "DevSecOps with GitLab" By Avishkar Nikale
#ATAGTR2019 Presentation "DevSecOps with GitLab" By Avishkar Nikale#ATAGTR2019 Presentation "DevSecOps with GitLab" By Avishkar Nikale
#ATAGTR2019 Presentation "DevSecOps with GitLab" By Avishkar Nikale
 
Selenium test automation
Selenium test automationSelenium test automation
Selenium test automation
 
Introduction to selenium
Introduction to seleniumIntroduction to selenium
Introduction to selenium
 
Continuous Delivery, Continuous Integration
Continuous Delivery, Continuous Integration Continuous Delivery, Continuous Integration
Continuous Delivery, Continuous Integration
 
CI/CD Best Practices for Building Modern Applications - MAD302 - Anaheim AWS ...
CI/CD Best Practices for Building Modern Applications - MAD302 - Anaheim AWS ...CI/CD Best Practices for Building Modern Applications - MAD302 - Anaheim AWS ...
CI/CD Best Practices for Building Modern Applications - MAD302 - Anaheim AWS ...
 
Ansible Automation to Rule Them All
Ansible Automation to Rule Them AllAnsible Automation to Rule Them All
Ansible Automation to Rule Them All
 
DevOps & SRE at Google Scale
DevOps & SRE at Google ScaleDevOps & SRE at Google Scale
DevOps & SRE at Google Scale
 
Cypress report
Cypress reportCypress report
Cypress report
 
Prometheus monitoring
Prometheus monitoringPrometheus monitoring
Prometheus monitoring
 
Sonarqube
SonarqubeSonarqube
Sonarqube
 
CI/CD Best Practices for Your DevOps Journey
CI/CD Best  Practices for Your DevOps JourneyCI/CD Best  Practices for Your DevOps Journey
CI/CD Best Practices for Your DevOps Journey
 
Developer Experience on AWS
Developer Experience on AWSDeveloper Experience on AWS
Developer Experience on AWS
 
SRE 101
SRE 101SRE 101
SRE 101
 
Selenium Maven With Eclipse | Edureka
Selenium Maven With Eclipse | EdurekaSelenium Maven With Eclipse | Edureka
Selenium Maven With Eclipse | Edureka
 
Past, Present and Future of DevOps Infrastructure
Past, Present and Future of DevOps InfrastructurePast, Present and Future of DevOps Infrastructure
Past, Present and Future of DevOps Infrastructure
 
Shift Deployment Security Left with Weave GitOps & Upbound’s Universal Crossp...
Shift Deployment Security Left with Weave GitOps & Upbound’s Universal Crossp...Shift Deployment Security Left with Weave GitOps & Upbound’s Universal Crossp...
Shift Deployment Security Left with Weave GitOps & Upbound’s Universal Crossp...
 
CICD with Jenkins
CICD with JenkinsCICD with Jenkins
CICD with Jenkins
 
An Introduction to Maven
An Introduction to MavenAn Introduction to Maven
An Introduction to Maven
 
QSpiders - Automation using Selenium
QSpiders - Automation using SeleniumQSpiders - Automation using Selenium
QSpiders - Automation using Selenium
 

Similar a Continuous delivery with jenkins pipelines (@devfest Vienna)

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
 
Jenkins Pipeline @ Scale. Building Automation Frameworks for Systems Integration
Jenkins Pipeline @ Scale. Building Automation Frameworks for Systems IntegrationJenkins Pipeline @ Scale. Building Automation Frameworks for Systems Integration
Jenkins Pipeline @ Scale. Building Automation Frameworks for Systems IntegrationOleg Nenashev
 
Continuous delivery with jenkins pipelines @ devdays
Continuous delivery with jenkins pipelines  @ devdaysContinuous delivery with jenkins pipelines  @ devdays
Continuous delivery with jenkins pipelines @ devdaysRoman Pickl
 
DevConf 2017 - Realistic Container Platform Simulations
DevConf 2017 - Realistic Container Platform SimulationsDevConf 2017 - Realistic Container Platform Simulations
DevConf 2017 - Realistic Container Platform SimulationsJeremy Eder
 
Containers and Microservices for Realists
Containers and Microservices for RealistsContainers and Microservices for Realists
Containers and Microservices for RealistsOracle Developers
 
Containers and microservices for realists
Containers and microservices for realistsContainers and microservices for realists
Containers and microservices for realistsKarthik Gaekwad
 
Build Your First SharePoint Framework Webpart
Build Your First SharePoint Framework WebpartBuild Your First SharePoint Framework Webpart
Build Your First SharePoint Framework WebpartEric Overfield
 
What's New in Docker - February 2017
What's New in Docker - February 2017What's New in Docker - February 2017
What's New in Docker - February 2017Patrick Chanezon
 
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
 
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
 
Real Time Streaming with Flink & Couchbase
Real Time Streaming with Flink & CouchbaseReal Time Streaming with Flink & Couchbase
Real Time Streaming with Flink & CouchbaseManuel Hurtado
 
Webinar: End-to-End CI/CD with GitLab and DC/OS
Webinar: End-to-End CI/CD with GitLab and DC/OSWebinar: End-to-End CI/CD with GitLab and DC/OS
Webinar: End-to-End CI/CD with GitLab and DC/OSMesosphere Inc.
 
Spark Pipelines in the Cloud with Alluxio with Gene Pang
Spark Pipelines in the Cloud with Alluxio with Gene PangSpark Pipelines in the Cloud with Alluxio with Gene Pang
Spark Pipelines in the Cloud with Alluxio with Gene PangSpark Summit
 
DevSecOps - Security in DevOps
DevSecOps - Security in DevOpsDevSecOps - Security in DevOps
DevSecOps - Security in DevOpsAarno Aukia
 
Spark Pipelines in the Cloud with Alluxio
Spark Pipelines in the Cloud with AlluxioSpark Pipelines in the Cloud with Alluxio
Spark Pipelines in the Cloud with AlluxioAlluxio, Inc.
 
Microservices & Serverless Architecture Principles Applied - Cisco Live Orlan...
Microservices & Serverless Architecture Principles Applied - Cisco Live Orlan...Microservices & Serverless Architecture Principles Applied - Cisco Live Orlan...
Microservices & Serverless Architecture Principles Applied - Cisco Live Orlan...Cisco DevNet
 
Continuous Delivery: Fly the Friendly CI in Pivotal Cloud Foundry with Concourse
Continuous Delivery: Fly the Friendly CI in Pivotal Cloud Foundry with ConcourseContinuous Delivery: Fly the Friendly CI in Pivotal Cloud Foundry with Concourse
Continuous Delivery: Fly the Friendly CI in Pivotal Cloud Foundry with ConcourseVMware Tanzu
 

Similar a Continuous delivery with jenkins pipelines (@devfest Vienna) (20)

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)
 
Jenkins Pipeline @ Scale. Building Automation Frameworks for Systems Integration
Jenkins Pipeline @ Scale. Building Automation Frameworks for Systems IntegrationJenkins Pipeline @ Scale. Building Automation Frameworks for Systems Integration
Jenkins Pipeline @ Scale. Building Automation Frameworks for Systems Integration
 
Continuous delivery with jenkins pipelines @ devdays
Continuous delivery with jenkins pipelines  @ devdaysContinuous delivery with jenkins pipelines  @ devdays
Continuous delivery with jenkins pipelines @ devdays
 
DevConf 2017 - Realistic Container Platform Simulations
DevConf 2017 - Realistic Container Platform SimulationsDevConf 2017 - Realistic Container Platform Simulations
DevConf 2017 - Realistic Container Platform Simulations
 
Containers and Microservices for Realists
Containers and Microservices for RealistsContainers and Microservices for Realists
Containers and Microservices for Realists
 
Containers and microservices for realists
Containers and microservices for realistsContainers and microservices for realists
Containers and microservices for realists
 
Build Your First SharePoint Framework Webpart
Build Your First SharePoint Framework WebpartBuild Your First SharePoint Framework Webpart
Build Your First SharePoint Framework Webpart
 
What's New in Docker - February 2017
What's New in Docker - February 2017What's New in Docker - February 2017
What's New in Docker - February 2017
 
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
 
EVOLVE'14 | Enhance | Anshul Chhabra & Akhil Aggrawal | Cisco - AEM High Avai...
EVOLVE'14 | Enhance | Anshul Chhabra & Akhil Aggrawal | Cisco - AEM High Avai...EVOLVE'14 | Enhance | Anshul Chhabra & Akhil Aggrawal | Cisco - AEM High Avai...
EVOLVE'14 | Enhance | Anshul Chhabra & Akhil Aggrawal | Cisco - AEM High Avai...
 
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
 
Securing DevOps
Securing DevOpsSecuring DevOps
Securing DevOps
 
Real Time Streaming with Flink & Couchbase
Real Time Streaming with Flink & CouchbaseReal Time Streaming with Flink & Couchbase
Real Time Streaming with Flink & Couchbase
 
Webinar: End-to-End CI/CD with GitLab and DC/OS
Webinar: End-to-End CI/CD with GitLab and DC/OSWebinar: End-to-End CI/CD with GitLab and DC/OS
Webinar: End-to-End CI/CD with GitLab and DC/OS
 
Spark Pipelines in the Cloud with Alluxio with Gene Pang
Spark Pipelines in the Cloud with Alluxio with Gene PangSpark Pipelines in the Cloud with Alluxio with Gene Pang
Spark Pipelines in the Cloud with Alluxio with Gene Pang
 
DevSecOps - Security in DevOps
DevSecOps - Security in DevOpsDevSecOps - Security in DevOps
DevSecOps - Security in DevOps
 
Spark Pipelines in the Cloud with Alluxio
Spark Pipelines in the Cloud with AlluxioSpark Pipelines in the Cloud with Alluxio
Spark Pipelines in the Cloud with Alluxio
 
Microservices & Serverless Architecture Principles Applied - Cisco Live Orlan...
Microservices & Serverless Architecture Principles Applied - Cisco Live Orlan...Microservices & Serverless Architecture Principles Applied - Cisco Live Orlan...
Microservices & Serverless Architecture Principles Applied - Cisco Live Orlan...
 
Continuous Delivery: Fly the Friendly CI in Pivotal Cloud Foundry with Concourse
Continuous Delivery: Fly the Friendly CI in Pivotal Cloud Foundry with ConcourseContinuous Delivery: Fly the Friendly CI in Pivotal Cloud Foundry with Concourse
Continuous Delivery: Fly the Friendly CI in Pivotal Cloud Foundry with Concourse
 

Más de 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 delivery with jenkins pipelines @devopsdays cairo
Continuous delivery with jenkins pipelines  @devopsdays cairoContinuous delivery with jenkins pipelines  @devopsdays cairo
Continuous delivery with jenkins pipelines @devopsdays cairoRoman Pickl
 
Continuous delivery with jenkins pipelines @devops pro moscow
Continuous delivery with jenkins pipelines @devops pro moscow Continuous delivery with jenkins pipelines @devops pro moscow
Continuous delivery with jenkins pipelines @devops pro moscow Roman Pickl
 

Más de Roman Pickl (6)

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 delivery with jenkins pipelines @devopsdays cairo
Continuous delivery with jenkins pipelines  @devopsdays cairoContinuous delivery with jenkins pipelines  @devopsdays cairo
Continuous delivery with jenkins pipelines @devopsdays cairo
 
Continuous delivery with jenkins pipelines @devops pro moscow
Continuous delivery with jenkins pipelines @devops pro moscow Continuous delivery with jenkins pipelines @devops pro moscow
Continuous delivery with jenkins pipelines @devops pro moscow
 

Último

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
 
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
 
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
 
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
 
renewable energy renewable energy renewable energy renewable energy
renewable energy renewable energy renewable energy  renewable energyrenewable energy renewable energy renewable energy  renewable energy
renewable energy renewable energy renewable energy renewable energyjeyasrig
 
Technical improvements. Reasons. Methods. Estimations. CJ
Technical improvements.  Reasons. Methods. Estimations. CJTechnical improvements.  Reasons. Methods. Estimations. CJ
Technical improvements. Reasons. Methods. Estimations. CJpolinaucc
 
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
 
User Experience Designer | Kaylee Miller Resume
User Experience Designer | Kaylee Miller ResumeUser Experience Designer | Kaylee Miller Resume
User Experience Designer | Kaylee Miller ResumeKaylee Miller
 
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
 
Unlocking AI: Navigating Open Source vs. Commercial Frontiers
Unlocking AI:Navigating Open Source vs. Commercial FrontiersUnlocking AI:Navigating Open Source vs. Commercial Frontiers
Unlocking AI: Navigating Open Source vs. Commercial FrontiersRaphaël Semeteys
 
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
 
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
 
Enterprise Content Managements Solutions
Enterprise Content Managements SolutionsEnterprise Content Managements Solutions
Enterprise Content Managements SolutionsIQBG inc
 
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
 
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
 
8 Steps to Build a LangChain RAG Chatbot.
8 Steps to Build a LangChain RAG Chatbot.8 Steps to Build a LangChain RAG Chatbot.
8 Steps to Build a LangChain RAG Chatbot.Ritesh Kanjee
 
Steps to Successfully Hire Ionic Developers
Steps to Successfully Hire Ionic DevelopersSteps to Successfully Hire Ionic Developers
Steps to Successfully Hire Ionic Developersmichealwillson701
 
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
 
8 key point on optimizing web hosting services in your business.pdf
8 key point on optimizing web hosting services in your business.pdf8 key point on optimizing web hosting services in your business.pdf
8 key point on optimizing web hosting services in your business.pdfOffsiteNOC
 

Último (20)

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
 
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
 
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
 
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
 
renewable energy renewable energy renewable energy renewable energy
renewable energy renewable energy renewable energy  renewable energyrenewable energy renewable energy renewable energy  renewable energy
renewable energy renewable energy renewable energy renewable energy
 
Technical improvements. Reasons. Methods. Estimations. CJ
Technical improvements.  Reasons. Methods. Estimations. CJTechnical improvements.  Reasons. Methods. Estimations. CJ
Technical improvements. Reasons. Methods. Estimations. CJ
 
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
 
User Experience Designer | Kaylee Miller Resume
User Experience Designer | Kaylee Miller ResumeUser Experience Designer | Kaylee Miller Resume
User Experience Designer | Kaylee Miller Resume
 
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...
 
Unlocking AI: Navigating Open Source vs. Commercial Frontiers
Unlocking AI:Navigating Open Source vs. Commercial FrontiersUnlocking AI:Navigating Open Source vs. Commercial Frontiers
Unlocking AI: Navigating Open Source vs. Commercial Frontiers
 
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
 
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
 
Enterprise Content Managements Solutions
Enterprise Content Managements SolutionsEnterprise Content Managements Solutions
Enterprise Content Managements Solutions
 
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...
 
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
 
8 Steps to Build a LangChain RAG Chatbot.
8 Steps to Build a LangChain RAG Chatbot.8 Steps to Build a LangChain RAG Chatbot.
8 Steps to Build a LangChain RAG Chatbot.
 
Steps to Successfully Hire Ionic Developers
Steps to Successfully Hire Ionic DevelopersSteps to Successfully Hire Ionic Developers
Steps to Successfully Hire Ionic Developers
 
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...
 
8 key point on optimizing web hosting services in your business.pdf
8 key point on optimizing web hosting services in your business.pdf8 key point on optimizing web hosting services in your business.pdf
8 key point on optimizing web hosting services in your business.pdf
 

Continuous delivery with jenkins pipelines (@devfest Vienna)

  • 1. © 2017 Copyright Fluidtime Data Services GmbH | www.fluidtime.com Continuous Delivery with Jenkins Pipelines (incl. Advanced Topics) Roman Pickl
  • 2. © 2017 Copyright Fluidtime Data Services GmbH | www.fluidtime.com • 10+ years’ experience in integrating transport systems • 22 mobility Apps in the stores • 43+ million requests / month • 500.000+ unique users / month At a glance qando Vienna, Linz, Graz, Salzburg, Klagenfurt. SMILE Lighthouse project for integrated mobility Wien Mobil Lab Vienna FluidHub Powering the Integrated Mobility and MaaS Ecosystem 2009 avv connect Aachen Region, North Rhine-Westphalia. 2014 NUMO Vienna 2012 2015 2016
  • 3. © 2017 Copyright Fluidtime Data Services GmbH | www.fluidtime.com How did I end up here? • Roman Pickl (@rompic) • CTO @ Fluidtime • In charge of the technical development • Uses Jenkins since 2012 • Loves CI/CD/DevOps • Here to learn
  • 4. © 2017 Copyright Fluidtime Data Services GmbH | www.fluidtime.com Continuous Delivery (CD) 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 Read these books! Jez Humble on Continuous Delivery(2012): https://www.youtube.com/watch?v=skLJuksCRTw
  • 5. © 2017 Copyright Fluidtime Data Services GmbH | www.fluidtime.com Deployment Pipelines (Let’s build it with jenkins) (Jez Humble D. F., Continuous Delivery: Reliable Software Releases Through Build, Test, and Deployment Automation, 2010)
  • 6. © 2017 Copyright Fluidtime Data Services GmbH | www.fluidtime.com Jenkins #1 Continuous Integration and Delivery server •Created by Kohsuke Kawaguchi •Initial Release 2005 (Hudson) •Open Source (MIT License) •Active and independent community (https://jenkins.io) •155,000 active installations •1,500+ 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 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/
  • 7. © 2017 Copyright Fluidtime Data Services GmbH | www.fluidtime.com Welcome Blue Ocean!
  • 8. © 2017 Copyright Fluidtime Data Services GmbH | www.fluidtime.com Create a Pipeline Wizard
  • 9. © 2017 Copyright Fluidtime Data Services GmbH | www.fluidtime.com 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) https://jenkins.io/doc/book/pipeline/jenkinsfile/
  • 10. © 2017 Copyright Fluidtime Data Services GmbH | www.fluidtime.com Scripted vs. Declarative Scripted Pipelines: Declarative Pipeline: https://jenkins.io/doc/book/pipeline/syntax/
  • 11. © 2017 Copyright Fluidtime Data Services GmbH | www.fluidtime.com Scripted vs. Declarative Scripted Pipeline: Declarative Pipeline: https://jenkins.io/doc/book/pipeline/syntax/ • 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 pipelinesBoth: • 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. © 2017 Copyright Fluidtime Data Services GmbH | www.fluidtime.com script Step • 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 https://jenkins.io/doc/book/pipeline/syntax/
  • 13. © 2017 Copyright Fluidtime Data Services GmbH | www.fluidtime.com Settings
  • 14. © 2017 Copyright Fluidtime Data Services GmbH | www.fluidtime.com Stages
  • 15. © 2017 Copyright Fluidtime Data Services GmbH | www.fluidtime.com Parallel Execution With declarative1.2
  • 16. © 2017 Copyright Fluidtime Data Services GmbH | www.fluidtime.com Approval ... Deploy to Stage, Deploy Live, Release omitted here
  • 17. © 2017 Copyright Fluidtime Data Services GmbH | www.fluidtime.com Post Build Notifications
  • 18. © 2017 Copyright Fluidtime Data Services GmbH | www.fluidtime.com Demo 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)
  • 19. © 2017 Copyright Fluidtime Data Services GmbH | www.fluidtime.com Blue Ocean 1.3.3 released 16.11.2017 • https://wiki.jenkins.io/display/JENKINS/Blue+Ocean+Plugin • Latest additions • JIRA integration • Declarative Pipeline version 1.2 support • Support of different Repositories Public roadmap https://jenkins.io/projects/blueocean/roadmap/
  • 20. © 2017 Copyright Fluidtime Data Services GmbH | www.fluidtime.com Overview
  • 21. © 2017 Copyright Fluidtime Data Services GmbH | www.fluidtime.com Approval
  • 22. © 2017 Copyright Fluidtime Data Services GmbH | www.fluidtime.com Detail
  • 23. © 2017 Copyright Fluidtime Data Services GmbH | www.fluidtime.com Multi branch support
  • 24. © 2017 Copyright Fluidtime Data Services GmbH | www.fluidtime.com Multi branch (When)
  • 25. © 2017 Copyright Fluidtime Data Services GmbH | www.fluidtime.com Pipeline Development and Advanced Tools • Blue Ocean Pipeline Editor • Snippet Generator • IntelliJ IDEA GDSL – Autocomplete • Command-line Pipeline Linter • Replay Feature • Unit Testing Jenkins Pipelines • Shared Libaries https://jenkins.io/doc/book/pipeline/development/ https://jenkins.io/doc/book/pipeline/shared-libraries/
  • 26. © 2017 Copyright Fluidtime Data Services GmbH | www.fluidtime.com Pipeline Editor GitLab currently not supported (planned! https://issues.jenkins-ci.org/browse/JENKINS-43148) Workaround: http://localhost:8080/blue/organizations/jenkins/pipeline-editor/ Ctrl-S / Cmd-S to open the load save dialog
  • 27. © 2017 Copyright Fluidtime Data Services GmbH | www.fluidtime.com Snippet generator http://localhost:8080/pipeline-syntax https://jenkins.io/doc/book/pipeline/getting-started/#snippet-generator
  • 28. © 2017 Copyright Fluidtime Data Services GmbH | www.fluidtime.com IntelliJ IDEA GDSL - Autocomplete • Autocompletion 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 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.
  • 29. © 2017 Copyright Fluidtime Data Services GmbH | www.fluidtime.com Command-line Pipeline Linter 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!
  • 30. © 2017 Copyright Fluidtime Data Services GmbH | www.fluidtime.com Replay Feature • 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 https://jenkins.io/doc/book/pipeline/development/
  • 31. © 2017 Copyright Fluidtime Data Services GmbH | www.fluidtime.com Shared Libraries 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/shar ed-libraries/ and https://jenkins.io/blog/2017/10/02/pipe line-templates-with-shared-libraries/ for more details.
  • 32. © 2017 Copyright Fluidtime Data Services GmbH | www.fluidtime.com Unit Testing Jenkins Pipelines •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
  • 33. © 2017 Copyright Fluidtime Data Services GmbH | www.fluidtime.com Things missing / Things to come Missing: • Support for definition of variables in declarative pipelines (see workaround in https://issues.jenkins-ci.org/browse/JENKINS-41335) • Keep build forever (https://issues.jenkins-ci.org/browse/JENKINS-39028 ; workaround via shared lib) • Restart stages for pipelines (checkpoint as commercial feature, https://issues.jenkins- ci.org/browse/JENKINS-33846 ; feature for declarative pipelines planned: https://issues.jenkins-ci.org/browse/JENKINS-45455 ) To Come: • Multiple jenkins files • More editor coverage of declaration syntax • jenkins pipeline support for changelog and changesets with when keyword • GitLab read/write support • ...
  • 34. © 2017 Copyright Fluidtime Data Services GmbH | www.fluidtime.com 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/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
  • 35. © 2017 Copyright Fluidtime Data Services GmbH | www.fluidtime.com Docker Files: https://github.com/jenkinsci/docker/blob/master/README.md https://hub.docker.com/r/jenkinsci/blueocean/ Further references & information II
  • 36. © 2017 Copyright Fluidtime Data Services GmbH | www.fluidtime.com Contact Roman Pickl (@rompic) roman.pickl@fluidtime.com Fluidtime Data Services GmbH Neubaugasse 12-14/25 A–1070 Wien Tel +43 (0)1 5860 180 www.fluidtime.com