SlideShare una empresa de Scribd logo
1 de 66
Descargar para leer sin conexión
Jenkins Pipeline @ Scale
Building Automation Frameworks for
Systems Integration
CloudBees | Jenkins Automotive
and Embedded Day
Böblingen, April 05, 2017
Oleg Nenashev, CloudBees
© 2017 CloudBees, Inc. All Rights Reserved. 2
About me. Hardware/Embedded
@oleg_nenashev
oleg-nenashev LibreCoresSt. Petersburg
Polytechnic University
© 2017 CloudBees, Inc. All Rights Reserved. 3
About me. Jenkins project
@oleg_nenashev
oleg-nenashev
© 2017 CloudBees, Inc. All Rights Reserved. 4
Oleg’s
“Hall of
Shame”(c)
• Jenkins Core
• Remoting
• Plugins
© 2017 CloudBees, Inc. All Rights Reserved. 5
2016
http://bit.ly/nenashev-automotive-day-2016
© 2017 CloudBees, Inc. All Rights Reserved. 6
ØHow/why do we build frameworks for Embedded?
ØWhat has changed in Pipeline since 2016?
ØHow to effectively use and develop Pipeline?
ØLessons learnt
Agenda
© 2017 CloudBees, Inc. All Rights Reserved. 7
• Pipeline 101
• Pipeline Generic Features
• Blue Ocean
• Declarative Pipeline
• Automation Infrastructure
• Agents, Tools, Hardware Peripherals
• Added-value Pipeline features in CloudBees Jenkins Enterprise
What is NOT in the talk?
Ask the Experts,
Jenkins Online Meetup
Birds of Feather,
Ask the Experts
© 2017 CloudBees, Inc. All Rights Reserved. 8
What is a typical Embedded Product?
`
Hardware
External IPFirmware /
Embedded
SW
External
SW
Development
tools / EDAs
Demo software Demo hardware
Developer kits
“Main product”
Documentation
© 2017 CloudBees, Inc. All Rights Reserved. 9
Embedded area.
Welcome to the automation hell!
• Almost everything needs to be automated
• Multiple technologies and tools
• Integration testing is important
• Unstable hardware & networks
• Legacy stuff is everywhere
• …
© 2017 CloudBees, Inc. All Rights Reserved. 10
OK, Automotive…
Source: http://www.popsautoelectric.com/auto-electric/
• System of systems
• High level of integration
• Components by 3rd
parties
• Many standards
• High quality requirements
© 2017 CloudBees, Inc. All Rights Reserved. 11
1. The most popular CI automation
server in the world
2. It’s a framework => flexible
• Swiss Army Knife of Automation
3. It’s open source => customizable
4. Commercial support is available
5. Useful plugins
Why Jenkins?
© 2017 CloudBees, Inc. All Rights Reserved. 12
Система
Docs
Plugins Configs
Infra-
structure
Samples
Demos
How do we build
CI Systems?
Infra-
structure
Infra-
structure
• Agents (FKA ”slaves”)
• Tools
• Hardware peripherals
• Computing grids
© 2017 CloudBees, Inc. All Rights Reserved. 13
Approach: Using “classic” Job types:
• Freestyle, Matrix, JobDSL, …
Classic Approaches
Keywords:
• Script steps to run the logic
• Custom Tools Plugin to manage tools
• Throttle Concurrent Builds and Lockable
Resources to dispatch access to hardware
• Naginator Plugin to restart builds on-demand
• Parameterized Trigger / Copy artifacts to
parallelize tests and to collect results
JUC2015/London
https://jenkins.io/solutions/embedded/
© 2017 CloudBees, Inc. All Rights Reserved. 14
Classic Approaches
Spaghetti Automation
• Barely traceable
dependencies
• Complex build flow
• Complex
configurations
• Duplication
• Expensive
maintenance
© 2017 CloudBees, Inc. All Rights Reserved. 15
ü Store build definitions with the project
ü Track changes together with the project
ü Tests together with the project
Configuration as Code
© 2017 CloudBees, Inc. All Rights Reserved. 16
Configuration as Code in Jenkins
Job ConfigurationJenkins system
configuration
© 2017 CloudBees, Inc. All Rights Reserved. 17
Jenkins System Configuration… as Code
External Tools
Jenkins CLI
and REST
API
python-
jenkins
jenkins-client
(java)
Configuration
Management
systems
Ansible, Chef
Docker
Solutions
within Jenkins
project
Groovy Boot
Hooks
Scriptler
Plugin
SCM Sync
Configuration
Unstable
Just examples…
© 2017 CloudBees, Inc. All Rights Reserved. 18
Configuration as Code for jobs
Job DSL
Job Builder Plugin
Jenkins Pipeline
Pipeline is offered by default in Jenkins 2.0
…
Groovy
YAML
Groovy
© 2017 CloudBees, Inc. All Rights Reserved. 19
Pipeline is a…
Ø Groovy DSL for automatic flow description *
• Alternatives – Job DSL, Jenkins Job Builder
Ø Job type in Jenkins (Pipeline Job)
• Job definitions can be stored in SCM
• Automatic job creation from repositories and organizations
Ø Ecosystem for automation as code
• ~20 dedicated plugins
• Integration in many other plugins
• Suggested by default in Jenkins 2
// Run on a node having the “my_fpga” label
node("linux && ml509") {
git url:"http://github.com/myorg/myproject.git"
sh "make all"
} http://bit.ly/pipeline-tutorial
19
© 2017 CloudBees, Inc. All Rights Reserved. 20
Why Jenkins Pipeline?
© 2017 CloudBees, Inc. All Rights Reserved. 21
Why Jenkins Pipeline?
• Robustness - master restarts & network
• Parallelization across multiple nodes:
• parallel()
• node()
• Ability to store the shared logic in
standalone Pipeline libraries
• Security
• Two modes: Scripted and Declarative
• Visualization: Stage View, Blue Ocean
© 2017 CloudBees, Inc. All Rights Reserved. 22
Система
Docs
Plugins Configs
Infra-
structure
Samples
Demos
Automation
Framework
Vision
Infra-
structure
Infra-
structure
SCM
Infrastructure as Code
Configuration as Code
Documentation as Code
Pipeline Libraries
Pipelines
© 2017 CloudBees, Inc. All Rights Reserved. 23
Developer Experience
• Encapsulation
• Simple UI
• Most of the code is in
GitHub
• No need in classic UI
for 90% of users
• Notifications to
email/GitHub
Jenkins Pipeline in Embedded
2016
© 2017 CloudBees, Inc. All Rights Reserved. 25
2016
http://bit.ly/nenashev-automotive-day-2016
© 2017 CloudBees, Inc. All Rights Reserved. 26
2016 – Summary
• Jenkins can be used to run tests on hardware in
embedded and automotive projects
• Jenkins Pipeline is helpful for test runs
• Pipeline lacks some critical features
© 2017 CloudBees, Inc. All Rights Reserved. 27
• Management of resources.
• Integration with Throttle Concurrent Builds plugin
• Use-case: limiting the license utilization in automation
infrastructures (JENKINS-31801)
• Better support of tools.
• Common build flow – dozens of tools
• Integration with Custom Tools Plugin seems to be the best option,
especially in the case of multiple tool versions (JENKINS-30680)
• Pipeline package manager (JENKINS-34186)
• Lack of plugins for EDA tools in Jenkins, code duplications
• A common approach is to keep the shared "functions" in libraries
• Pipeline Global Library and Pipeline Remote Loader can be used
2016 – Pipeline improvement areas
From my talk at
CloudBees |
Jenkins Automotive
and Embedded Day
2016
© 2017 CloudBees, Inc. All Rights Reserved. 28
• Management of resources.
• Integration with Throttle Concurrent Builds plugin
• Use-case: limiting the license utilization in automation
infrastructures (JENKINS-31801)
• Better support of tools.
• Common build flow – dozens of tools
• Integration with Custom Tools Plugin seems to be the best option,
especially in the case of multiple tool versions (JENKINS-30680)
• Pipeline package manager (JENKINS-34186)
• Lack of plugins for EDA tools in Jenkins, code duplications
• A common approach is to keep the shared "functions" in libraries
• Pipeline Global Library and Pipeline Remote Loader can be used
2016 – Pipeline improvement areas
From my talk at
CloudBees |
Jenkins Automotive
and Embedded Day
2016
© 2017 CloudBees, Inc. All Rights Reserved. 29
Management of resources
• Lockable Resources Plugin – since 2016
• Throttle Concurrent Builds – coming soon
• Pipeline Milestones
© 2017 CloudBees, Inc. All Rights Reserved. 30
PARTIAL - Better support of tools
• withEnv() for environment variables
• tool() step in Pipeline was improved
• Tool reference in the Job
• Section in Declarative Pipeline
• Custom tools is not fully integrated
• Follow JENKINS-30680
• ETA – Q2, 2017
© 2017 CloudBees, Inc. All Rights Reserved. 31
DONE – Pipeline Libs (Pipeline Package Manager)
• Early 2016
• Global Pipeline Library
• Pipeline Remote Loader Plugin
• Late 2016
• Pipeline Shared Libraries
• Support of @Grab – Pipeline libs
can pull common Groovy libs
Library Structure:
© 2017 CloudBees, Inc. All Rights Reserved. 32
• Pipeline Shared Libraries
• Libs are located in SCM
• Versioning
• Definition for scopes:
▸ Jenkins system-wide
▸ Folder
▸ Job
© 2017 CloudBees, Inc. All Rights Reserved. 33
Pipeline Library Definition [1/2]
© 2017 CloudBees, Inc. All Rights Reserved. 34
Pipeline Library Definition [2/2]
© 2017 CloudBees, Inc. All Rights Reserved. 35
Using Pipeline Libraries
• Implicit Loading
• Via Jenkins Global or Folder configuration
• Explicit Loading
• @Library
© 2017 CloudBees, Inc. All Rights Reserved. 36
Using Pipeline Libraries
com.mycorp.libs.make
Jenkinsfile
makeProject()
makeProject() implementation
- global variable
com.mycorp.libs.coverity
com.mycorp.libs.cppunit
Globally-defined
library, automatic
update
@Library() definition
© 2017 CloudBees, Inc. All Rights Reserved. 37
Early adoption of
any framework
http://devopsreactions.tumblr.c
om/post/150674592321/pettin
g-your-incomprehensible-
piece-of-code
• It is working!
• In several pet projects…
Lessons Learnt.
What does NOT work well?
Lessons Learnt.
What does NOT work well?
• Development Tools
• Non-Success Path handling
• Declarative Pipeline
• Manual release management
© 2017 CloudBees, Inc. All Rights Reserved. 40
Pipeline Developer Experience
• No Debugger
• No IDE
• No built-in test framework
• Limited static analysis features
•Pipeline DSL != Groovy
© 2017 CloudBees, Inc. All Rights Reserved. 41
How do I work?
Intellij IDEA
Filesystem
SCM Plugin
(with patch)
Disclaimer: There
may be better ways
• Syntax file
• Built-in documentation
Jenkins Test
Instance
Source Code
(local .git repos)
• Production
System Snapshot
• Custom Pipeline
Library Settings
• Repositories for libraries
• Jenkinsfile repos
© 2017 CloudBees, Inc. All Rights Reserved. 42
Getting the Syntax File
© 2017 CloudBees, Inc. All Rights Reserved. 43
Filesystem SCM Plugin
• Pending pull request:
• https://github.com/jenkinsci/filesystem_scm-plugin/pull/2
Library definition in
the test instance
!!!
© 2017 CloudBees, Inc. All Rights Reserved. 44
Pipeline Testing
• No standard test framework offered by the Jenkins project
• External project: https://github.com/lesfurets/JenkinsPipelineUnit
“mvn verify” has
been invoked…
And the execution
passed…
For the source
Jenkinsfile…
Lessons Learnt.
What does NOT work well?
• Development Tools
• Non-Success Path handling
• Declarative Pipeline
• Manual release management
© 2017 CloudBees, Inc. All Rights Reserved. 46
Error Handling
• IMHO: Pipeline is designed for Success Path scenarios
When it
“Just works”
When it does not
© 2017 CloudBees, Inc. All Rights Reserved. 47
Error Handling. Top-level
Scripted Pipeline Declarative Pipeline
• Global try/catch()
When it does not…
© 2017 CloudBees, Inc. All Rights Reserved. 48
Error Handling
When it
“Just works”
When it does not
The interesting part…
Failover, repeat
© 2017 CloudBees, Inc. All Rights Reserved. 49
Error Handling. Hardware failover
• Pipeline allows re-running unreliable
stages on other nodes.
System failure
(script returns 253)
Node #1 Node #2. . .
. . .
for (def board : boards) {
echo "trying board " + board;
try {
node(board) {
checkout scm
sh ‘./bin/run.sh’
// Call passed => DONE
break;
}
} catch (Exception ex) {
if (ex.message.contains
("exit code 253")) {
// Fatal error
fail("Test run failed")
}
}
}
Try all possible boards:
© 2017 CloudBees, Inc. All Rights Reserved. 50
Error handling.
Hardware failover
for (def board : boards) {
echo "trying board " + board;
try {
node(board) {
checkout scm
sh ‘./bin/run.sh’
// Call passed => DONE
break;
}
} catch (Exception ex) {
if (ex.message.contains
("exit code 255")) {
// Fatal error
fail("Test run failed")
} } }
???
• Hard to extract error cause
• Special handling is required for
every case
• Cannot just use existing parsers
• Build Failure Analyzer
• Log Parser
• Warnings
• Try-catch blocks pollute the code
• Hard to test
© 2017 CloudBees, Inc. All Rights Reserved. 51
Context retention
• No way to propagate any data
• Solution - @NonCPS steps within the library steps
© 2017 CloudBees, Inc. All Rights Reserved. 52
Error handling.
Hardware failover
Declarative
Pipeline
Encapsulation via
Libraries
Simple use-case
Other
• Exception try/catch
• timeout() wrapper
• Proper failover
• Logic in @NonCPS
Lessons Learnt.
What does NOT work well?
• Development Tools
• Non-Success Path handling
• Declarative Pipeline
• Manual release management
© 2017 CloudBees, Inc. All Rights Reserved. 54
Declarative Pipeline
• It is great for simple use-cases
• Publishers & Notifiers
• We do not need a framework for simple use-cases
• Lack of features
• “How do I pass option for the Docker Agent”
• “How do I declare a resource requirement for Throttling?”
• …
• Scripted Pipeline is a recommended fallback, but
there is no automatic migration
© 2017 CloudBees, Inc. All Rights Reserved. 55
Declarative Pipeline. Recommendations
• Use Declarative Pipeline with caution
• Complex agent definitions – use Scripted Pipeline
• Complex throttling – use Scripted Pipeline
• Post-build steps – work well
• Tool definitions – work well
• …
Lessons Learnt.
What does NOT work well?
• Development Tools
• Non-Success Path handling
• Declarative Pipeline
• Manual release management
© 2017 CloudBees, Inc. All Rights Reserved. 57
Pipeline vs. Application Lifecycle
© 2017 CloudBees, Inc. All Rights Reserved. 58
Pipeline vs. Application Lifecycle
BUT:
• Non-CD process with manual promotion
• Dependent products
• Snowflake development stages
© 2017 CloudBees, Inc. All Rights Reserved. 59
Solutions
• Input() step + milestone() for synchronization
• Multiple Pipelines
• Release() step is coming soon
• Release Plugin
Pipeline 1 Pipeline 2
Run Selector
Staging
Artifact
Storage
External ALM tool
CD for the Component 1
CI/CD for the Component 2
Lessons learnt
• No area-specific issues so far
• High barrier to entry
• It worth investment
© 2017 CloudBees, Inc. All Rights Reserved. 61
What I need? 2017
• Development Tools for Pipeline
• IDE, Debugger, Test Tools
• Community Pipeline Libraries
• Common Embedded cases without plugins
• Promotion engine for Pipeline
• Ideally: Merge of standard Promoted
Builds and Release plugins
• Plugins for area-specific tools
© 2017 CloudBees, Inc. All Rights Reserved. 62
Takeaways
• Jenkins Pipeline is a powerful engine for
highly-customized Jenkins instances
• Jenkins Pipeline can be effectively used
in Embedded/Automotive use-cases
• Barrier to entry is still high
© 2017 CloudBees, Inc. All Rights Reserved. 63
More info
• Embedded solutions page:
• https://jenkins.io/solutions/embedded/
• Links to the articles and videos
• Some categorization
Embedded Solutions
Page
…
© 2017 CloudBees, Inc. All Rights Reserved. 64
• Jenkins project:
• Website: https://jenkins.io
• Embedded Solutions page: https://jenkins.io/solutions/embedded/
• Pipeline:
• Tutorial: https://github.com/jenkinsci/workflow-plugin/blob/master/TUTORIAL.md
• Compatibility: https://github.com/jenkinsci/pipeline-plugin/blob/master/COMPATIBILITY.md
• Examples: https://github.com/jenkinsci/pipeline-examples
• CloudBees website:
• Website: https://www.cloudbees.com
• CloudBees Jenkins Platform: https://www.cloudbees.com/products/cloudbees-jenkins-platform
Useful Links
© 2017 CloudBees, Inc. All Rights Reserved. 65
Thank you!
Contacts:
E-mail: onenashev@cloudbees.com
GitHub: oleg-nenashev
Twitter: @oleg_nenashev
Software at the speed of ideas
THANK YOU!
www.cloudbees.com

Más contenido relacionado

La actualidad más candente

(Declarative) Jenkins Pipelines
(Declarative) Jenkins Pipelines(Declarative) Jenkins Pipelines
(Declarative) Jenkins PipelinesSteffen Gebert
 
Delivery Pipeline as Code: using Jenkins 2.0 Pipeline
Delivery Pipeline as Code: using Jenkins 2.0 PipelineDelivery Pipeline as Code: using Jenkins 2.0 Pipeline
Delivery Pipeline as Code: using Jenkins 2.0 PipelineSlawa Giterman
 
JavaOne 2016 - Pipeline as code
JavaOne 2016 - Pipeline as codeJavaOne 2016 - Pipeline as code
JavaOne 2016 - Pipeline as codeBert Jan Schrijver
 
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
 
Belarus Jenkins Meetup - Managing security in Jenkins with configuration-as-c...
Belarus Jenkins Meetup - Managing security in Jenkins with configuration-as-c...Belarus Jenkins Meetup - Managing security in Jenkins with configuration-as-c...
Belarus Jenkins Meetup - Managing security in Jenkins with configuration-as-c...Oleg Nenashev
 
Building an Extensible, Resumable DSL on Top of Apache Groovy
Building an Extensible, Resumable DSL on Top of Apache GroovyBuilding an Extensible, Resumable DSL on Top of Apache Groovy
Building an Extensible, Resumable DSL on Top of Apache Groovyjgcloudbees
 
Jenkins, pipeline and docker
Jenkins, pipeline and docker Jenkins, pipeline and docker
Jenkins, pipeline and docker AgileDenver
 
Pipeline based deployments on Jenkins
Pipeline based deployments  on JenkinsPipeline based deployments  on Jenkins
Pipeline based deployments on JenkinsKnoldus Inc.
 
Continuous delivery with jenkins pipelines @ devdays
Continuous delivery with jenkins pipelines  @ devdaysContinuous delivery with jenkins pipelines  @ devdays
Continuous delivery with jenkins pipelines @ devdaysRoman Pickl
 
Configuration as Code in Jenkins. What's new? Nov 2016
Configuration as Code in Jenkins. What's new? Nov 2016Configuration as Code in Jenkins. What's new? Nov 2016
Configuration as Code in Jenkins. What's new? Nov 2016Oleg Nenashev
 
Monitoring Akka with Kamon 1.0
Monitoring Akka with Kamon 1.0Monitoring Akka with Kamon 1.0
Monitoring Akka with Kamon 1.0Steffen Gebert
 
Building Jenkins Pipelines at Scale
Building Jenkins Pipelines at ScaleBuilding Jenkins Pipelines at Scale
Building Jenkins Pipelines at ScaleJulien Pivotto
 
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
 
Let's go HTTPS-only! - More Than Buying a Certificate
Let's go HTTPS-only! - More Than Buying a CertificateLet's go HTTPS-only! - More Than Buying a Certificate
Let's go HTTPS-only! - More Than Buying a CertificateSteffen Gebert
 
Testing with Docker
Testing with DockerTesting with Docker
Testing with Dockertoffermann
 
Voxxed Luxembourd 2016 Jenkins 2.0 et Pipeline as code
Voxxed Luxembourd 2016 Jenkins 2.0 et Pipeline as codeVoxxed Luxembourd 2016 Jenkins 2.0 et Pipeline as code
Voxxed Luxembourd 2016 Jenkins 2.0 et Pipeline as codeDamien Duportal
 
Stop Being Lazy and Test Your Software
Stop Being Lazy and Test Your SoftwareStop Being Lazy and Test Your Software
Stop Being Lazy and Test Your SoftwareLaura Frank Tacho
 
JUC Europe 2015: Scaling Your Jenkins Master with Docker
JUC Europe 2015: Scaling Your Jenkins Master with DockerJUC Europe 2015: Scaling Your Jenkins Master with Docker
JUC Europe 2015: Scaling Your Jenkins Master with DockerCloudBees
 
Automated Deployment Pipeline using Jenkins, Puppet, Mcollective and AWS
Automated Deployment Pipeline using Jenkins, Puppet, Mcollective and AWSAutomated Deployment Pipeline using Jenkins, Puppet, Mcollective and AWS
Automated Deployment Pipeline using Jenkins, Puppet, Mcollective and AWSBamdad Dashtban
 

La actualidad más candente (20)

(Declarative) Jenkins Pipelines
(Declarative) Jenkins Pipelines(Declarative) Jenkins Pipelines
(Declarative) Jenkins Pipelines
 
Delivery Pipeline as Code: using Jenkins 2.0 Pipeline
Delivery Pipeline as Code: using Jenkins 2.0 PipelineDelivery Pipeline as Code: using Jenkins 2.0 Pipeline
Delivery Pipeline as Code: using Jenkins 2.0 Pipeline
 
JavaOne 2016 - Pipeline as code
JavaOne 2016 - Pipeline as codeJavaOne 2016 - Pipeline as code
JavaOne 2016 - Pipeline as code
 
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)
 
Belarus Jenkins Meetup - Managing security in Jenkins with configuration-as-c...
Belarus Jenkins Meetup - Managing security in Jenkins with configuration-as-c...Belarus Jenkins Meetup - Managing security in Jenkins with configuration-as-c...
Belarus Jenkins Meetup - Managing security in Jenkins with configuration-as-c...
 
Building an Extensible, Resumable DSL on Top of Apache Groovy
Building an Extensible, Resumable DSL on Top of Apache GroovyBuilding an Extensible, Resumable DSL on Top of Apache Groovy
Building an Extensible, Resumable DSL on Top of Apache Groovy
 
Jenkins Pipelines
Jenkins PipelinesJenkins Pipelines
Jenkins Pipelines
 
Jenkins, pipeline and docker
Jenkins, pipeline and docker Jenkins, pipeline and docker
Jenkins, pipeline and docker
 
Pipeline based deployments on Jenkins
Pipeline based deployments  on JenkinsPipeline based deployments  on Jenkins
Pipeline based deployments on Jenkins
 
Continuous delivery with jenkins pipelines @ devdays
Continuous delivery with jenkins pipelines  @ devdaysContinuous delivery with jenkins pipelines  @ devdays
Continuous delivery with jenkins pipelines @ devdays
 
Configuration as Code in Jenkins. What's new? Nov 2016
Configuration as Code in Jenkins. What's new? Nov 2016Configuration as Code in Jenkins. What's new? Nov 2016
Configuration as Code in Jenkins. What's new? Nov 2016
 
Monitoring Akka with Kamon 1.0
Monitoring Akka with Kamon 1.0Monitoring Akka with Kamon 1.0
Monitoring Akka with Kamon 1.0
 
Building Jenkins Pipelines at Scale
Building Jenkins Pipelines at ScaleBuilding Jenkins Pipelines at Scale
Building Jenkins Pipelines at Scale
 
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
 
Let's go HTTPS-only! - More Than Buying a Certificate
Let's go HTTPS-only! - More Than Buying a CertificateLet's go HTTPS-only! - More Than Buying a Certificate
Let's go HTTPS-only! - More Than Buying a Certificate
 
Testing with Docker
Testing with DockerTesting with Docker
Testing with Docker
 
Voxxed Luxembourd 2016 Jenkins 2.0 et Pipeline as code
Voxxed Luxembourd 2016 Jenkins 2.0 et Pipeline as codeVoxxed Luxembourd 2016 Jenkins 2.0 et Pipeline as code
Voxxed Luxembourd 2016 Jenkins 2.0 et Pipeline as code
 
Stop Being Lazy and Test Your Software
Stop Being Lazy and Test Your SoftwareStop Being Lazy and Test Your Software
Stop Being Lazy and Test Your Software
 
JUC Europe 2015: Scaling Your Jenkins Master with Docker
JUC Europe 2015: Scaling Your Jenkins Master with DockerJUC Europe 2015: Scaling Your Jenkins Master with Docker
JUC Europe 2015: Scaling Your Jenkins Master with Docker
 
Automated Deployment Pipeline using Jenkins, Puppet, Mcollective and AWS
Automated Deployment Pipeline using Jenkins, Puppet, Mcollective and AWSAutomated Deployment Pipeline using Jenkins, Puppet, Mcollective and AWS
Automated Deployment Pipeline using Jenkins, Puppet, Mcollective and AWS
 

Similar a Jenkins Pipeline @ Scale. Building Automation Frameworks for Systems Integration

The Butler is still young – applying modern Jenkins features to the Embedded ...
The Butler is still young – applying modern Jenkins features to the Embedded ...The Butler is still young – applying modern Jenkins features to the Embedded ...
The Butler is still young – applying modern Jenkins features to the Embedded ...Oleg Nenashev
 
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
 
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.
 
DevOpsDays 2018 - Migrating a Cloud Native App to k8s
DevOpsDays 2018 - Migrating a Cloud Native App to k8sDevOpsDays 2018 - Migrating a Cloud Native App to k8s
DevOpsDays 2018 - Migrating a Cloud Native App to k8sGökhan Şengün
 
CNCF Introduction - Feb 2018
CNCF Introduction - Feb 2018CNCF Introduction - Feb 2018
CNCF Introduction - Feb 2018Krishna-Kumar
 
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
 
Building cloud native microservices
Building cloud native microservicesBuilding cloud native microservices
Building cloud native microservicesBrian Pulito
 
Containers, microservices and serverless for realists
Containers, microservices and serverless for realistsContainers, microservices and serverless for realists
Containers, microservices and serverless for realistsKarthik Gaekwad
 
Agile Secure Cloud Application Development Management
Agile Secure Cloud Application Development ManagementAgile Secure Cloud Application Development Management
Agile Secure Cloud Application Development ManagementAdam Getchell
 
Introduction to Apache Mesos and DC/OS
Introduction to Apache Mesos and DC/OSIntroduction to Apache Mesos and DC/OS
Introduction to Apache Mesos and DC/OSSteve Wong
 
Oscon 2017: Build your own container-based system with the Moby project
Oscon 2017: Build your own container-based system with the Moby projectOscon 2017: Build your own container-based system with the Moby project
Oscon 2017: Build your own container-based system with the Moby projectPatrick Chanezon
 
Continuous Delivery on IBM Bluemix: Manage Cloud Native Services with Cloud N...
Continuous Delivery on IBM Bluemix: Manage Cloud Native Services with Cloud N...Continuous Delivery on IBM Bluemix: Manage Cloud Native Services with Cloud N...
Continuous Delivery on IBM Bluemix: Manage Cloud Native Services with Cloud N...Michael Elder
 
Pipelining DevOps with Jenkins and AWS
Pipelining DevOps with Jenkins and AWSPipelining DevOps with Jenkins and AWS
Pipelining DevOps with Jenkins and AWSJimmy Ray
 
OpenFaaS 2019 Project Update
OpenFaaS 2019 Project UpdateOpenFaaS 2019 Project Update
OpenFaaS 2019 Project UpdateAlex Ellis
 
Data Agility for Devops - OSI 2018
Data Agility for Devops - OSI 2018Data Agility for Devops - OSI 2018
Data Agility for Devops - OSI 2018OpenEBS
 
software technology benchmarking
software  technology benchmarkingsoftware  technology benchmarking
software technology benchmarkingMallikarjuna G D
 
Net Devops Overview
Net Devops OverviewNet Devops Overview
Net Devops OverviewJoel W. King
 
Continuous Integration and Deployment with Jenkins for PCF
Continuous Integration and Deployment with Jenkins for PCFContinuous Integration and Deployment with Jenkins for PCF
Continuous Integration and Deployment with Jenkins for PCFVMware Tanzu
 

Similar a Jenkins Pipeline @ Scale. Building Automation Frameworks for Systems Integration (20)

The Butler is still young – applying modern Jenkins features to the Embedded ...
The Butler is still young – applying modern Jenkins features to the Embedded ...The Butler is still young – applying modern Jenkins features to the Embedded ...
The Butler is still young – applying modern Jenkins features to the Embedded ...
 
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)
 
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
 
DevOpsDays 2018 - Migrating a Cloud Native App to k8s
DevOpsDays 2018 - Migrating a Cloud Native App to k8sDevOpsDays 2018 - Migrating a Cloud Native App to k8s
DevOpsDays 2018 - Migrating a Cloud Native App to k8s
 
CNCF Introduction - Feb 2018
CNCF Introduction - Feb 2018CNCF Introduction - Feb 2018
CNCF Introduction - Feb 2018
 
Short-Training asp.net vNext
Short-Training asp.net vNextShort-Training asp.net vNext
Short-Training asp.net vNext
 
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...
 
Building cloud native microservices
Building cloud native microservicesBuilding cloud native microservices
Building cloud native microservices
 
Containers, microservices and serverless for realists
Containers, microservices and serverless for realistsContainers, microservices and serverless for realists
Containers, microservices and serverless for realists
 
Agile Secure Cloud Application Development Management
Agile Secure Cloud Application Development ManagementAgile Secure Cloud Application Development Management
Agile Secure Cloud Application Development Management
 
Introduction to Apache Mesos and DC/OS
Introduction to Apache Mesos and DC/OSIntroduction to Apache Mesos and DC/OS
Introduction to Apache Mesos and DC/OS
 
Oscon 2017: Build your own container-based system with the Moby project
Oscon 2017: Build your own container-based system with the Moby projectOscon 2017: Build your own container-based system with the Moby project
Oscon 2017: Build your own container-based system with the Moby project
 
Continuous Delivery on IBM Bluemix: Manage Cloud Native Services with Cloud N...
Continuous Delivery on IBM Bluemix: Manage Cloud Native Services with Cloud N...Continuous Delivery on IBM Bluemix: Manage Cloud Native Services with Cloud N...
Continuous Delivery on IBM Bluemix: Manage Cloud Native Services with Cloud N...
 
BRKSDN-2115
BRKSDN-2115 BRKSDN-2115
BRKSDN-2115
 
Pipelining DevOps with Jenkins and AWS
Pipelining DevOps with Jenkins and AWSPipelining DevOps with Jenkins and AWS
Pipelining DevOps with Jenkins and AWS
 
OpenFaaS 2019 Project Update
OpenFaaS 2019 Project UpdateOpenFaaS 2019 Project Update
OpenFaaS 2019 Project Update
 
Data Agility for Devops - OSI 2018
Data Agility for Devops - OSI 2018Data Agility for Devops - OSI 2018
Data Agility for Devops - OSI 2018
 
software technology benchmarking
software  technology benchmarkingsoftware  technology benchmarking
software technology benchmarking
 
Net Devops Overview
Net Devops OverviewNet Devops Overview
Net Devops Overview
 
Continuous Integration and Deployment with Jenkins for PCF
Continuous Integration and Deployment with Jenkins for PCFContinuous Integration and Deployment with Jenkins for PCF
Continuous Integration and Deployment with Jenkins for PCF
 

Último

Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...OnePlan Solutions
 
Machine Learning Software Engineering Patterns and Their Engineering
Machine Learning Software Engineering Patterns and Their EngineeringMachine Learning Software Engineering Patterns and Their Engineering
Machine Learning Software Engineering Patterns and Their EngineeringHironori Washizaki
 
A healthy diet for your Java application Devoxx France.pdf
A healthy diet for your Java application Devoxx France.pdfA healthy diet for your Java application Devoxx France.pdf
A healthy diet for your Java application Devoxx France.pdfMarharyta Nedzelska
 
Balasore Best It Company|| Top 10 IT Company || Balasore Software company Odisha
Balasore Best It Company|| Top 10 IT Company || Balasore Software company OdishaBalasore Best It Company|| Top 10 IT Company || Balasore Software company Odisha
Balasore Best It Company|| Top 10 IT Company || Balasore Software company Odishasmiwainfosol
 
Unveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New FeaturesUnveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New FeaturesŁukasz Chruściel
 
React Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief UtamaReact Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief UtamaHanief Utama
 
VK Business Profile - provides IT solutions and Web Development
VK Business Profile - provides IT solutions and Web DevelopmentVK Business Profile - provides IT solutions and Web Development
VK Business Profile - provides IT solutions and Web Developmentvyaparkranti
 
Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024Andreas Granig
 
Unveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML DiagramsUnveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML DiagramsAhmed Mohamed
 
cpct NetworkING BASICS AND NETWORK TOOL.ppt
cpct NetworkING BASICS AND NETWORK TOOL.pptcpct NetworkING BASICS AND NETWORK TOOL.ppt
cpct NetworkING BASICS AND NETWORK TOOL.pptrcbcrtm
 
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样umasea
 
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024StefanoLambiase
 
Folding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a seriesFolding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a seriesPhilip Schwarz
 
Precise and Complete Requirements? An Elusive Goal
Precise and Complete Requirements? An Elusive GoalPrecise and Complete Requirements? An Elusive Goal
Precise and Complete Requirements? An Elusive GoalLionel Briand
 
Exploring Selenium_Appium Frameworks for Seamless Integration with HeadSpin.pdf
Exploring Selenium_Appium Frameworks for Seamless Integration with HeadSpin.pdfExploring Selenium_Appium Frameworks for Seamless Integration with HeadSpin.pdf
Exploring Selenium_Appium Frameworks for Seamless Integration with HeadSpin.pdfkalichargn70th171
 
MYjobs Presentation Django-based project
MYjobs Presentation Django-based projectMYjobs Presentation Django-based project
MYjobs Presentation Django-based projectAnoyGreter
 
Ahmed Motair CV April 2024 (Senior SW Developer)
Ahmed Motair CV April 2024 (Senior SW Developer)Ahmed Motair CV April 2024 (Senior SW Developer)
Ahmed Motair CV April 2024 (Senior SW Developer)Ahmed Mater
 
Implementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureImplementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureDinusha Kumarasiri
 
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte GermanySuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte GermanyChristoph Pohl
 
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...Matt Ray
 

Último (20)

Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...
 
Machine Learning Software Engineering Patterns and Their Engineering
Machine Learning Software Engineering Patterns and Their EngineeringMachine Learning Software Engineering Patterns and Their Engineering
Machine Learning Software Engineering Patterns and Their Engineering
 
A healthy diet for your Java application Devoxx France.pdf
A healthy diet for your Java application Devoxx France.pdfA healthy diet for your Java application Devoxx France.pdf
A healthy diet for your Java application Devoxx France.pdf
 
Balasore Best It Company|| Top 10 IT Company || Balasore Software company Odisha
Balasore Best It Company|| Top 10 IT Company || Balasore Software company OdishaBalasore Best It Company|| Top 10 IT Company || Balasore Software company Odisha
Balasore Best It Company|| Top 10 IT Company || Balasore Software company Odisha
 
Unveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New FeaturesUnveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New Features
 
React Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief UtamaReact Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief Utama
 
VK Business Profile - provides IT solutions and Web Development
VK Business Profile - provides IT solutions and Web DevelopmentVK Business Profile - provides IT solutions and Web Development
VK Business Profile - provides IT solutions and Web Development
 
Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024
 
Unveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML DiagramsUnveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML Diagrams
 
cpct NetworkING BASICS AND NETWORK TOOL.ppt
cpct NetworkING BASICS AND NETWORK TOOL.pptcpct NetworkING BASICS AND NETWORK TOOL.ppt
cpct NetworkING BASICS AND NETWORK TOOL.ppt
 
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
 
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
 
Folding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a seriesFolding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a series
 
Precise and Complete Requirements? An Elusive Goal
Precise and Complete Requirements? An Elusive GoalPrecise and Complete Requirements? An Elusive Goal
Precise and Complete Requirements? An Elusive Goal
 
Exploring Selenium_Appium Frameworks for Seamless Integration with HeadSpin.pdf
Exploring Selenium_Appium Frameworks for Seamless Integration with HeadSpin.pdfExploring Selenium_Appium Frameworks for Seamless Integration with HeadSpin.pdf
Exploring Selenium_Appium Frameworks for Seamless Integration with HeadSpin.pdf
 
MYjobs Presentation Django-based project
MYjobs Presentation Django-based projectMYjobs Presentation Django-based project
MYjobs Presentation Django-based project
 
Ahmed Motair CV April 2024 (Senior SW Developer)
Ahmed Motair CV April 2024 (Senior SW Developer)Ahmed Motair CV April 2024 (Senior SW Developer)
Ahmed Motair CV April 2024 (Senior SW Developer)
 
Implementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureImplementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with Azure
 
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte GermanySuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
 
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
 

Jenkins Pipeline @ Scale. Building Automation Frameworks for Systems Integration

  • 1. Jenkins Pipeline @ Scale Building Automation Frameworks for Systems Integration CloudBees | Jenkins Automotive and Embedded Day Böblingen, April 05, 2017 Oleg Nenashev, CloudBees
  • 2. © 2017 CloudBees, Inc. All Rights Reserved. 2 About me. Hardware/Embedded @oleg_nenashev oleg-nenashev LibreCoresSt. Petersburg Polytechnic University
  • 3. © 2017 CloudBees, Inc. All Rights Reserved. 3 About me. Jenkins project @oleg_nenashev oleg-nenashev
  • 4. © 2017 CloudBees, Inc. All Rights Reserved. 4 Oleg’s “Hall of Shame”(c) • Jenkins Core • Remoting • Plugins
  • 5. © 2017 CloudBees, Inc. All Rights Reserved. 5 2016 http://bit.ly/nenashev-automotive-day-2016
  • 6. © 2017 CloudBees, Inc. All Rights Reserved. 6 ØHow/why do we build frameworks for Embedded? ØWhat has changed in Pipeline since 2016? ØHow to effectively use and develop Pipeline? ØLessons learnt Agenda
  • 7. © 2017 CloudBees, Inc. All Rights Reserved. 7 • Pipeline 101 • Pipeline Generic Features • Blue Ocean • Declarative Pipeline • Automation Infrastructure • Agents, Tools, Hardware Peripherals • Added-value Pipeline features in CloudBees Jenkins Enterprise What is NOT in the talk? Ask the Experts, Jenkins Online Meetup Birds of Feather, Ask the Experts
  • 8. © 2017 CloudBees, Inc. All Rights Reserved. 8 What is a typical Embedded Product? ` Hardware External IPFirmware / Embedded SW External SW Development tools / EDAs Demo software Demo hardware Developer kits “Main product” Documentation
  • 9. © 2017 CloudBees, Inc. All Rights Reserved. 9 Embedded area. Welcome to the automation hell! • Almost everything needs to be automated • Multiple technologies and tools • Integration testing is important • Unstable hardware & networks • Legacy stuff is everywhere • …
  • 10. © 2017 CloudBees, Inc. All Rights Reserved. 10 OK, Automotive… Source: http://www.popsautoelectric.com/auto-electric/ • System of systems • High level of integration • Components by 3rd parties • Many standards • High quality requirements
  • 11. © 2017 CloudBees, Inc. All Rights Reserved. 11 1. The most popular CI automation server in the world 2. It’s a framework => flexible • Swiss Army Knife of Automation 3. It’s open source => customizable 4. Commercial support is available 5. Useful plugins Why Jenkins?
  • 12. © 2017 CloudBees, Inc. All Rights Reserved. 12 Система Docs Plugins Configs Infra- structure Samples Demos How do we build CI Systems? Infra- structure Infra- structure • Agents (FKA ”slaves”) • Tools • Hardware peripherals • Computing grids
  • 13. © 2017 CloudBees, Inc. All Rights Reserved. 13 Approach: Using “classic” Job types: • Freestyle, Matrix, JobDSL, … Classic Approaches Keywords: • Script steps to run the logic • Custom Tools Plugin to manage tools • Throttle Concurrent Builds and Lockable Resources to dispatch access to hardware • Naginator Plugin to restart builds on-demand • Parameterized Trigger / Copy artifacts to parallelize tests and to collect results JUC2015/London https://jenkins.io/solutions/embedded/
  • 14. © 2017 CloudBees, Inc. All Rights Reserved. 14 Classic Approaches Spaghetti Automation • Barely traceable dependencies • Complex build flow • Complex configurations • Duplication • Expensive maintenance
  • 15. © 2017 CloudBees, Inc. All Rights Reserved. 15 ü Store build definitions with the project ü Track changes together with the project ü Tests together with the project Configuration as Code
  • 16. © 2017 CloudBees, Inc. All Rights Reserved. 16 Configuration as Code in Jenkins Job ConfigurationJenkins system configuration
  • 17. © 2017 CloudBees, Inc. All Rights Reserved. 17 Jenkins System Configuration… as Code External Tools Jenkins CLI and REST API python- jenkins jenkins-client (java) Configuration Management systems Ansible, Chef Docker Solutions within Jenkins project Groovy Boot Hooks Scriptler Plugin SCM Sync Configuration Unstable Just examples…
  • 18. © 2017 CloudBees, Inc. All Rights Reserved. 18 Configuration as Code for jobs Job DSL Job Builder Plugin Jenkins Pipeline Pipeline is offered by default in Jenkins 2.0 … Groovy YAML Groovy
  • 19. © 2017 CloudBees, Inc. All Rights Reserved. 19 Pipeline is a… Ø Groovy DSL for automatic flow description * • Alternatives – Job DSL, Jenkins Job Builder Ø Job type in Jenkins (Pipeline Job) • Job definitions can be stored in SCM • Automatic job creation from repositories and organizations Ø Ecosystem for automation as code • ~20 dedicated plugins • Integration in many other plugins • Suggested by default in Jenkins 2 // Run on a node having the “my_fpga” label node("linux && ml509") { git url:"http://github.com/myorg/myproject.git" sh "make all" } http://bit.ly/pipeline-tutorial 19
  • 20. © 2017 CloudBees, Inc. All Rights Reserved. 20 Why Jenkins Pipeline?
  • 21. © 2017 CloudBees, Inc. All Rights Reserved. 21 Why Jenkins Pipeline? • Robustness - master restarts & network • Parallelization across multiple nodes: • parallel() • node() • Ability to store the shared logic in standalone Pipeline libraries • Security • Two modes: Scripted and Declarative • Visualization: Stage View, Blue Ocean
  • 22. © 2017 CloudBees, Inc. All Rights Reserved. 22 Система Docs Plugins Configs Infra- structure Samples Demos Automation Framework Vision Infra- structure Infra- structure SCM Infrastructure as Code Configuration as Code Documentation as Code Pipeline Libraries Pipelines
  • 23. © 2017 CloudBees, Inc. All Rights Reserved. 23 Developer Experience • Encapsulation • Simple UI • Most of the code is in GitHub • No need in classic UI for 90% of users • Notifications to email/GitHub
  • 24. Jenkins Pipeline in Embedded 2016
  • 25. © 2017 CloudBees, Inc. All Rights Reserved. 25 2016 http://bit.ly/nenashev-automotive-day-2016
  • 26. © 2017 CloudBees, Inc. All Rights Reserved. 26 2016 – Summary • Jenkins can be used to run tests on hardware in embedded and automotive projects • Jenkins Pipeline is helpful for test runs • Pipeline lacks some critical features
  • 27. © 2017 CloudBees, Inc. All Rights Reserved. 27 • Management of resources. • Integration with Throttle Concurrent Builds plugin • Use-case: limiting the license utilization in automation infrastructures (JENKINS-31801) • Better support of tools. • Common build flow – dozens of tools • Integration with Custom Tools Plugin seems to be the best option, especially in the case of multiple tool versions (JENKINS-30680) • Pipeline package manager (JENKINS-34186) • Lack of plugins for EDA tools in Jenkins, code duplications • A common approach is to keep the shared "functions" in libraries • Pipeline Global Library and Pipeline Remote Loader can be used 2016 – Pipeline improvement areas From my talk at CloudBees | Jenkins Automotive and Embedded Day 2016
  • 28. © 2017 CloudBees, Inc. All Rights Reserved. 28 • Management of resources. • Integration with Throttle Concurrent Builds plugin • Use-case: limiting the license utilization in automation infrastructures (JENKINS-31801) • Better support of tools. • Common build flow – dozens of tools • Integration with Custom Tools Plugin seems to be the best option, especially in the case of multiple tool versions (JENKINS-30680) • Pipeline package manager (JENKINS-34186) • Lack of plugins for EDA tools in Jenkins, code duplications • A common approach is to keep the shared "functions" in libraries • Pipeline Global Library and Pipeline Remote Loader can be used 2016 – Pipeline improvement areas From my talk at CloudBees | Jenkins Automotive and Embedded Day 2016
  • 29. © 2017 CloudBees, Inc. All Rights Reserved. 29 Management of resources • Lockable Resources Plugin – since 2016 • Throttle Concurrent Builds – coming soon • Pipeline Milestones
  • 30. © 2017 CloudBees, Inc. All Rights Reserved. 30 PARTIAL - Better support of tools • withEnv() for environment variables • tool() step in Pipeline was improved • Tool reference in the Job • Section in Declarative Pipeline • Custom tools is not fully integrated • Follow JENKINS-30680 • ETA – Q2, 2017
  • 31. © 2017 CloudBees, Inc. All Rights Reserved. 31 DONE – Pipeline Libs (Pipeline Package Manager) • Early 2016 • Global Pipeline Library • Pipeline Remote Loader Plugin • Late 2016 • Pipeline Shared Libraries • Support of @Grab – Pipeline libs can pull common Groovy libs Library Structure:
  • 32. © 2017 CloudBees, Inc. All Rights Reserved. 32 • Pipeline Shared Libraries • Libs are located in SCM • Versioning • Definition for scopes: ▸ Jenkins system-wide ▸ Folder ▸ Job
  • 33. © 2017 CloudBees, Inc. All Rights Reserved. 33 Pipeline Library Definition [1/2]
  • 34. © 2017 CloudBees, Inc. All Rights Reserved. 34 Pipeline Library Definition [2/2]
  • 35. © 2017 CloudBees, Inc. All Rights Reserved. 35 Using Pipeline Libraries • Implicit Loading • Via Jenkins Global or Folder configuration • Explicit Loading • @Library
  • 36. © 2017 CloudBees, Inc. All Rights Reserved. 36 Using Pipeline Libraries com.mycorp.libs.make Jenkinsfile makeProject() makeProject() implementation - global variable com.mycorp.libs.coverity com.mycorp.libs.cppunit Globally-defined library, automatic update @Library() definition
  • 37. © 2017 CloudBees, Inc. All Rights Reserved. 37 Early adoption of any framework http://devopsreactions.tumblr.c om/post/150674592321/pettin g-your-incomprehensible- piece-of-code • It is working! • In several pet projects…
  • 38. Lessons Learnt. What does NOT work well?
  • 39. Lessons Learnt. What does NOT work well? • Development Tools • Non-Success Path handling • Declarative Pipeline • Manual release management
  • 40. © 2017 CloudBees, Inc. All Rights Reserved. 40 Pipeline Developer Experience • No Debugger • No IDE • No built-in test framework • Limited static analysis features •Pipeline DSL != Groovy
  • 41. © 2017 CloudBees, Inc. All Rights Reserved. 41 How do I work? Intellij IDEA Filesystem SCM Plugin (with patch) Disclaimer: There may be better ways • Syntax file • Built-in documentation Jenkins Test Instance Source Code (local .git repos) • Production System Snapshot • Custom Pipeline Library Settings • Repositories for libraries • Jenkinsfile repos
  • 42. © 2017 CloudBees, Inc. All Rights Reserved. 42 Getting the Syntax File
  • 43. © 2017 CloudBees, Inc. All Rights Reserved. 43 Filesystem SCM Plugin • Pending pull request: • https://github.com/jenkinsci/filesystem_scm-plugin/pull/2 Library definition in the test instance !!!
  • 44. © 2017 CloudBees, Inc. All Rights Reserved. 44 Pipeline Testing • No standard test framework offered by the Jenkins project • External project: https://github.com/lesfurets/JenkinsPipelineUnit “mvn verify” has been invoked… And the execution passed… For the source Jenkinsfile…
  • 45. Lessons Learnt. What does NOT work well? • Development Tools • Non-Success Path handling • Declarative Pipeline • Manual release management
  • 46. © 2017 CloudBees, Inc. All Rights Reserved. 46 Error Handling • IMHO: Pipeline is designed for Success Path scenarios When it “Just works” When it does not
  • 47. © 2017 CloudBees, Inc. All Rights Reserved. 47 Error Handling. Top-level Scripted Pipeline Declarative Pipeline • Global try/catch() When it does not…
  • 48. © 2017 CloudBees, Inc. All Rights Reserved. 48 Error Handling When it “Just works” When it does not The interesting part… Failover, repeat
  • 49. © 2017 CloudBees, Inc. All Rights Reserved. 49 Error Handling. Hardware failover • Pipeline allows re-running unreliable stages on other nodes. System failure (script returns 253) Node #1 Node #2. . . . . . for (def board : boards) { echo "trying board " + board; try { node(board) { checkout scm sh ‘./bin/run.sh’ // Call passed => DONE break; } } catch (Exception ex) { if (ex.message.contains ("exit code 253")) { // Fatal error fail("Test run failed") } } } Try all possible boards:
  • 50. © 2017 CloudBees, Inc. All Rights Reserved. 50 Error handling. Hardware failover for (def board : boards) { echo "trying board " + board; try { node(board) { checkout scm sh ‘./bin/run.sh’ // Call passed => DONE break; } } catch (Exception ex) { if (ex.message.contains ("exit code 255")) { // Fatal error fail("Test run failed") } } } ??? • Hard to extract error cause • Special handling is required for every case • Cannot just use existing parsers • Build Failure Analyzer • Log Parser • Warnings • Try-catch blocks pollute the code • Hard to test
  • 51. © 2017 CloudBees, Inc. All Rights Reserved. 51 Context retention • No way to propagate any data • Solution - @NonCPS steps within the library steps
  • 52. © 2017 CloudBees, Inc. All Rights Reserved. 52 Error handling. Hardware failover Declarative Pipeline Encapsulation via Libraries Simple use-case Other • Exception try/catch • timeout() wrapper • Proper failover • Logic in @NonCPS
  • 53. Lessons Learnt. What does NOT work well? • Development Tools • Non-Success Path handling • Declarative Pipeline • Manual release management
  • 54. © 2017 CloudBees, Inc. All Rights Reserved. 54 Declarative Pipeline • It is great for simple use-cases • Publishers & Notifiers • We do not need a framework for simple use-cases • Lack of features • “How do I pass option for the Docker Agent” • “How do I declare a resource requirement for Throttling?” • … • Scripted Pipeline is a recommended fallback, but there is no automatic migration
  • 55. © 2017 CloudBees, Inc. All Rights Reserved. 55 Declarative Pipeline. Recommendations • Use Declarative Pipeline with caution • Complex agent definitions – use Scripted Pipeline • Complex throttling – use Scripted Pipeline • Post-build steps – work well • Tool definitions – work well • …
  • 56. Lessons Learnt. What does NOT work well? • Development Tools • Non-Success Path handling • Declarative Pipeline • Manual release management
  • 57. © 2017 CloudBees, Inc. All Rights Reserved. 57 Pipeline vs. Application Lifecycle
  • 58. © 2017 CloudBees, Inc. All Rights Reserved. 58 Pipeline vs. Application Lifecycle BUT: • Non-CD process with manual promotion • Dependent products • Snowflake development stages
  • 59. © 2017 CloudBees, Inc. All Rights Reserved. 59 Solutions • Input() step + milestone() for synchronization • Multiple Pipelines • Release() step is coming soon • Release Plugin Pipeline 1 Pipeline 2 Run Selector Staging Artifact Storage External ALM tool CD for the Component 1 CI/CD for the Component 2
  • 60. Lessons learnt • No area-specific issues so far • High barrier to entry • It worth investment
  • 61. © 2017 CloudBees, Inc. All Rights Reserved. 61 What I need? 2017 • Development Tools for Pipeline • IDE, Debugger, Test Tools • Community Pipeline Libraries • Common Embedded cases without plugins • Promotion engine for Pipeline • Ideally: Merge of standard Promoted Builds and Release plugins • Plugins for area-specific tools
  • 62. © 2017 CloudBees, Inc. All Rights Reserved. 62 Takeaways • Jenkins Pipeline is a powerful engine for highly-customized Jenkins instances • Jenkins Pipeline can be effectively used in Embedded/Automotive use-cases • Barrier to entry is still high
  • 63. © 2017 CloudBees, Inc. All Rights Reserved. 63 More info • Embedded solutions page: • https://jenkins.io/solutions/embedded/ • Links to the articles and videos • Some categorization Embedded Solutions Page …
  • 64. © 2017 CloudBees, Inc. All Rights Reserved. 64 • Jenkins project: • Website: https://jenkins.io • Embedded Solutions page: https://jenkins.io/solutions/embedded/ • Pipeline: • Tutorial: https://github.com/jenkinsci/workflow-plugin/blob/master/TUTORIAL.md • Compatibility: https://github.com/jenkinsci/pipeline-plugin/blob/master/COMPATIBILITY.md • Examples: https://github.com/jenkinsci/pipeline-examples • CloudBees website: • Website: https://www.cloudbees.com • CloudBees Jenkins Platform: https://www.cloudbees.com/products/cloudbees-jenkins-platform Useful Links
  • 65. © 2017 CloudBees, Inc. All Rights Reserved. 65 Thank you! Contacts: E-mail: onenashev@cloudbees.com GitHub: oleg-nenashev Twitter: @oleg_nenashev
  • 66. Software at the speed of ideas THANK YOU! www.cloudbees.com