Preparing the Jenkins environment

In this section, we will take you through the steps to install Jenkins, the GitHub plugin for Jenkins and git, and the revision control tool. The steps are as follows:

  1. We begin with adding the Jenkins' trusted PGP public key:
      $ wget -q -O - \      https://jenkins-ci.org/debian/jenkins-ci.org.key | \      sudo apt-key add -

Here, we are using wget to download the PGP public key, and then we add it to the list of trusted keys using the apt-key tool. Since Ubuntu and Debian share the same software packaging, Jenkins provides a single common package for both Ubuntu and Debian.

  1. Add the Debian package location to the apt package source list, as follows:
      $ sudo sh -c \ 'echo deb http://pkg.jenkins-ci.org/debian binary/ ...

Get Learning Docker - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.