GitHub gave BookNest a CI pipeline with no server to look after: GitHub Actions 29 starts a fresh virtual machine for every job and throws it away afterward. Docker packaged the API as a Docker 514 image. This chapter builds the same code and image on a CI server you run yourself.
Jenkins 8,793 is the veteran of open-source automation servers, and still one of the most widely deployed. It is a Java web application that you install, patch and back up; it schedules builds onto machines you provide; and most of what it can do comes from its 2,000+ plugins. That is more work than Actions, and more control.
Everything here runs on a real controller, Jenkins LTS 2.568.3 on Java 21 from the official jenkins/jenkins:lts-jdk21 image in the Ubuntu 26.04 225 WSL2 6 distribution. It checks BookNest out of GitHub 29 , tests it against PostgreSQL 18 1,289 , builds the image with Docker's Dockerfile and pushes it to a local registry.
What you will learn:
Where Jenkins came from, who governs it, and when it beats GitHub Actions
How controllers, agents and executors run a build, and how a Pipeline survives a restart
Installing Jenkins with Docker, plugins, and Declarative and Scripted Pipeline in depth
Multibranch pipelines with GitHub, shared libraries, agents, and building BookNest's image
Configuration as code, security, backups and upgrades, and the alternatives to Jenkins
Sections
- From Hudson to Jenkins
- CI/CD Revisited
- How Builds Run
- Surviving Restarts
- Installing Jenkins with Docker
- Plugins and the Update Center
- Freestyle Jobs Versus Pipeline
- Declarative Pipeline
- Scripted Pipeline
- Jenkinsfiles in Source Control
- Shared Libraries
- Build Agents
- Building the Image
- Reports and Notifications
- Config as Code
- Securing Jenkins
- Backups and Upgrades
- Jenkins and Its Alternatives
- Test Yourself!