Download presentation
Presentation is loading. Please wait.
Published byKristina Cameron Casey Modified over 8 years ago
1
Jenkins 2.x Chris Vogel
2
Agenda O Jenkins background O Installation O Jenkins 2.x highlights O Build pipelines O Pipeline DSL O Multibranch plugin
3
Jenkins O An open source continuous integration tool O Extensible with over 1000 plugins O Master/agent architecture O Released weekly (currently 2.17) O Has quarterly LTS releases (2.7.2)
4
History O Originally released in February 2005 as Hudson O Forked in February 2011 as Jenkins O Released version 2.0 on April 20, 2016
5
Installation O Download WAR file O Run as executable WAR file O Install in web container (e.g. Tomcat) O Run as Docker container O jenkins – LTS release O jenkinsci/jenkins – weekly release
6
Installation O Native installations O Debian-based distribution O apt-get O Red Hat-based distribution O yum O Windows O Master and agents as Windows service
7
Setup Wizard O Initializes security O Requires initial, generated, admin password O Allows creation of admin account O Plugin configuration O Suggested plugins O Manual selection
8
Setup Wizard Demo
9
Jenkins 2.x Highlights O Focused more on continuous delivery O Pipeline DSL O Maintains backwards compatibility O Improved job configuration screens O Tab metaphor O Improved “New Item” screen O Same interface
10
New UI (Blue Ocean) O Re-thinks the Jenkins user experience O A separate UI O Old and new side-by-side O Currently in alpha
12
Build Pipeline “Automated manifestation of your process for getting software from version control into the hands of your users”
13
Example Project O Baseball Standings O Spring Boot O Gradle O JUnit O Jacoco O Docker O Selenium O MySQL
14
Example Pipeline O Checkout O Build/Test O Publish test results & code coverage O Sonar code analysis O Create Docker image O Run system tests
15
Build Pipeline O Legacy Pipeline (Jenkins 1.x) O Chain individual jobs together
16
Build Pipeline O Legacy Pipeline (Jenkins 1.x) O Chain individual jobs together O Build Pipeline Plugin View
17
Legacy Pipeline Demo
18
Build Pipeline O New Pipeline (Jenkins 2.x) O Pipeline DSL O Pipeline as code O In job vs in SCM
19
Pipeline DSL O Groovy-based Domain Specific Language O Extensible by plugins O Extensible by Pipeline Global Library O Web-based snippet generator O IntelliJ IDEA GroovyDSL downloadable script
20
Pipeline as Code O Design a whole pipeline, not a linear set of tasks O Store the pipeline configuration (Jenkinsfile) in a text file in SCM O Automatically set up new pipelines when configuration files are added O Differentiate multiple branches in the same repository https://wiki.jenkins-ci.org/display/JENKINS/2.0+Pipeline+as+Code
21
Pipeline Goals O Complex requirements - fork/join, loop, parallel O Resilient – survive master restarts O Pausable – pause and wait for human input O Efficient – restart from saved checkpoints (Enterprise) O Visualized – Pipeline StageView dashboard
22
Pipeline Vocabulary O Step O A single task/build step O Stage O Grouping of logical build steps O Node O Schedules build steps on a build agent O Creates a workspace
23
Pipeline DSL Steps O build: Build a job O checkout: General SCM O echo: Print message O git: Git O input: Wait for interactive input O mail: Mail O node: Allocate node
24
Pipeline DSL Steps O sh: Shell script O stage: Stage O step: General build step O tool: Use a tool from a predefined tool installation
25
DSL Global Variables O env: Environment variables O scm: SCM configuration, multibranch or script from SCM O docker: Docker-related functions O Build images O Manage images O Run containers
26
Jenkins 2.x Pipeline Demo
27
Multibranch Job O Enables configuration of jobs for branches of a project O Automatically discovers branches O Requires a Jenkinsfile in the project root
28
Multibranch Job Demo
30
Resources O Website - http://jenkins.iohttp://jenkins.io O Getting Started with Pipeline - https://jenkins.io/doc/pipeline/ https://jenkins.io/doc/pipeline/ O Pipeline Tutorial - https://github.com/jenkinsci/pipeline- plugin/blob/master/TUTORIAL.md https://github.com/jenkinsci/pipeline- plugin/blob/master/TUTORIAL.md O Plugin Compatibility with Pipeline - https://github.com/jenkinsci/pipeline- plugin/blob/master/COMPATIBILITY.md https://github.com/jenkinsci/pipeline- plugin/blob/master/COMPATIBILITY.md
31
Resources O Continuous Deliver with Jenkins Workflow and Docker - http://www.coding- stories.com/blog/2015/08/23/continuous- delivery-with-jenkins-workflow-and-docker/http://www.coding- stories.com/blog/2015/08/23/continuous- delivery-with-jenkins-workflow-and-docker/ O Introducting Blue Ocean - https://jenkins.io/blog/2016/05/26/introducin g-blue-ocean/ https://jenkins.io/blog/2016/05/26/introducin g-blue-ocean/ O My Jenkinsfile - https://github.com/captdestrukto/STL-JUG- Jenkins2 https://github.com/captdestrukto/STL-JUG- Jenkins2
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.