Jenkins Cheat Sheet

In progress

Jenkins is an open-source automation server for builds, tests and deployments, extended by plugins. These are its key terms and the ways I install it.

Overview

Term Meaning
Job / project a user-configured description of work for Jenkins to manage (the two words are interchangeable)
Build one run of a job
Build step one task inside a job
Build trigger what starts a build: a button, a schedule, a push to the repository
Pipeline a job defined as code in a Jenkinsfile, kept in the repository
Plugin an extension that adds integrations or features

Details

Run Jenkins in a Container

docker run --detach --name jenkins \
  --publish 127.0.0.1:8080:8080 \
  --volume jenkins_home:/var/jenkins_home \
  jenkins/jenkins:lts

# Initial admin password for the setup wizard
docker exec jenkins cat /var/jenkins_home/secrets/initialAdminPassword

A container makes it easy to try plugins without risking a main installation; the jenkins_home volume keeps the configuration across restarts.

Run Jenkins as a Service on Debian/Ubuntu

After installing from the official pkg.jenkins.io repository:

sudo systemctl enable --now jenkins
sudo systemctl status jenkins
sudo cat /var/lib/jenkins/secrets/initialAdminPassword

References

Review cards

Flashcard What is the purpose of the `jenkins_home` volume in the Docker container setup?

The jenkins_home volume is used to persist Jenkins configuration and data across container restarts, ensuring that settings and builds are not lost.