BCS SPA2017

Continuous Delivery with Jenkins 2

How to build pipelines from scratch

Tutorial (150 min)

Abstract

Have you ever looked for a platform to define builds and deployment pipelines with code written in a real programming language and stored inside version control? The 2016 major version of Jenkins introduced Pipeline as Code for this reason, instantly setting a standard for its huge community of users and plugins.

This workshop will put your hands on:
- building delivery pipelines which test a project in isolation, in integration environments and finally deploy it to production
- build all the pull requests in an organization to give timely feedback to developers
- make use of shared resources such as virtual machines, without failing because of race conditions or conflicting builds
- remove duplication from pipelines by extracting libraries of steps
- automatically open pull requests proposing changes, such as the update of libraries

Audience background

Capable of working from the command line and knowing at least one programming language (pipelines are written in Groovy). A machine that can run Docker containers.

Benefits of participating

Getting to know a proven and popular platform for building continuous integration and continuous deployment pipelines, with minimal dependencies such as CPU time and a Github account.

Materials provided

Download links for the Jenkins jar and link to the reference documentation for pipeline steps. Sample repositories to use for setting up pipelines. But most of all a docker container to start a turnkey, configured Jenkins ready for experimentation.

Process

The attendees run Jenkins on their own machine and use the sample repositories to set up builds of increasingly complex behavior. Reference solutions are provided at the end of each exercise.

Detailed timetable

0-15: introduction to pipelines and example
15-30: attendeed build their first pipeline
30-60: exercise, building pull requests
60-90: exercise, using shared resources with locks
90-120: exercise, remove duplication
120-150: exercise, automatically open pull requests

Outputs

Reference tutorial with downloads and repositories to reproduce the experience elsewhere.

Presenters

  1. Giorgio Sironi
    eLife Sciences Publications Ltd