Jenkins 2: Beyond the basics
Honing your pipeline skills with Jenkinsfiles, Declarative Pipelines, and Blue Ocean
Jenkins, the industry-standard continuous delivery (CD) orchestrator, has evolved. In Jenkins 2, pipelines are now written as structured code with a rich, descriptive DSL (pipelines as code) and use powerful features to automate and simplify CD job chains.
Brent Laster takes you beyond the basics of pipeline as code, teaching you how to use Declarative Pipeline and Blue Ocean—alternative methods available in Jenkins 2—to simplify your pipeline scripts. Along the way, you’ll learn how to convert to and use Jenkinsfile to have Jenkins automatically create and execute jobs for you based on your source code repository and explore advanced functionality such as parallelism in pipelines.
What you'll learn-and how you can apply it
By the end of this live, online course, you’ll understand:
- Declarative Pipeline and Blue Ocean, alternatives to pipeline as code in Jenkins 2
- Advanced Jenkins 2 functionality such as parallelism in pipelines
And you’ll be able to:
- Use Declarative Pipeline and Blue Ocean to simplify your pipeline scripts
- Use Jenkinsfiles to automatically create and execute jobs
This training course is for you because...
- You’re a Jenkins user or support person with investments in the traditional Jenkins model, and you need to understand the Jenkins 2 model.
- You're a developer or tester with dependencies on Jenkins processing, and you want to learn what value Jenkinsfiles, Declarative Pipelines, and Blue Ocean provide.
- Experience working with the traditional Jenkins model
- Basic familiarity with continuous delivery pipeline concepts
- A working knowledge of Git (useful but not required)
Required materials and setup:
- A machine with VirtualBox installed
- Download the course VM image here, and complete the remaining setup instructions https://github.com/brentlaster/safaridocs/blob/master/J2BBsetup.pdf
- Course Labs: https://github.com/brentlaster/safaridocs/blob/master/J2BBlabs.pdf
About your instructor
Brent Laster is a global trainer, author, and speaker on open source technologies as well as a senior R&D manager at a top technology company. He has been involved in the software industry for more than 25 years, holding various technical and management positions.
Brent has always tried to make time to learn and develop both technical and leadership skills and share them with others. He believes that regardless of the topic or technology, there’s no substitute for the excitement and sense of potential that come from providing others with the knowledge they need to accomplish their goals.
The timeframes are only estimates and may vary according to how the class is progressing
Jenkinsfiles and new project types (25 minutes)
- Lecture: Folder projects; the Jenkinsfile; multibranch projects; GitHub Organization projects
- Hands-on exercise: Set up a multibranch project with a Jenkinsfile and see how Jenkins automatically detects new branches and creates associated projects
Jenkins 2 and parallelism (30 minutes)
- Lecture: Requirements for using parallelism; different ways of adding parallelism; sharing content between nodes; ensuring a clean workspace
- Hands-on exercise: Implement parallel processing for testing that includes sharing content across nodes in your Jenkinsfile
Break (10 minutes)
Declarative Pipelines (30 minutes)
- Lecture: Plugins needed for Declarative Pipelines; motivation for Declarative Pipelines; Declarative Pipeline basic concepts; new sections—pipeline, agent, tools, environment, postbuild notifications; build conditions; example; enhanced validation with syntax and error checking
- Hands-on exercise: Convert your existing pipeline script to fit the declarative model, introduce an error, and see how it is flagged and handled
The Blue Ocean user interface (25 minutes)
- Lecture: General form; examples of runs in progress, succeeded, and failed; viewing logs
- Hands-on exercise: Execute and observe a run of your Declarative Pipeline through the Blue Ocean interface
Break (10 minutes)
Using Blue Ocean (35 minutes)
- Lecture: Editing pipelines in Blue Ocean; debugging and replay in Blue Ocean; additional functionality
- Hands-on exercise: Modify your pipeline via the Blue Ocean interface; debug your pipeline in Blue Ocean and Replay
Wrap-up and Q&A (15 minutes)