Introduction to Jenkins
The original CI/CD automation server β still everywhere in the enterprise.
Before GitHub Actions and GitLab CI, there was Jenkins β the open-source automation server that popularised continuous integration. Itβs self-hosted, endlessly extensible, and still runs the pipelines of a huge number of companies. Knowing Jenkins is a genuine advantage in the job market.
π― Learning Objectives
By the end of this lesson you will:
- Understand what Jenkins is and what it automates
- Know the controller/agent architecture
- Understand plugins and why they matter
- Compare Jenkins with cloud-native CI like GitHub Actions
What is Jenkins?
Jenkins is a self-hosted automation server. You install it on your own infrastructure, and it runs jobs and pipelines: building code, running tests, deploying releases β triggered by code changes, schedules, or manual clicks.
π‘ The one-line version
Jenkins is a server you run yourself that automates the build-test-deploy cycle. Its superpower is flexibility β thousands of plugins let it integrate with almost anything.
Controller / Agent Architecture
Jenkins scales by separating the brain from the muscle:
ββββββββββββ Controller ββββββββββββ
β schedules jobs, stores config, β
β serves the web UI β
ββββββββββββββββ¬βββββββββββββββββββββ
β dispatches work
ββββββββββββββββΌβββββββββββββββ
Agent 1 Agent 2 Agent 3
(runs builds) (runs builds) (runs builds)| Component | Role |
|---|---|
| Controller (master) | Orchestrates jobs, stores configuration, serves the UI. Shouldnβt run heavy builds itself. |
| Agent (node) | Executes the actual build work, on separate machines. |
This lets you run many builds in parallel across many machines, and use agents with different environments (Linux, Windows, GPU, etc.).
Plugins β Jenkinsβ Superpower (and Caveat)
Jenkins itself is a small core; nearly all capability comes from plugins β over 1,800 of them. Git integration, Docker, Kubernetes, cloud deploys, notifications: all plugins.
β Plugins are power and risk
Plugins make Jenkins do almost anything, but theyβre also its biggest maintenance burden: version conflicts, security updates, and occasional breakage. Keep plugins minimal and updated β treat them as dependencies you must maintain.
Jenkins vs Cloud-Native CI
| Jenkins | GitHub Actions | |
|---|---|---|
| Hosting | You host and maintain it | Fully managed by GitHub |
| Setup | More involved | Minimal β itβs built in |
| Flexibility | Extreme (plugins, any environment) | High, within GitHubβs model |
| Cost | Your infrastructure | Included / usage-based |
| Best for | Complex, on-prem, highly customised needs | Projects already on GitHub |
π‘ Why learn both?
Cloud CI is simpler for new projects, but Jenkins runs deeply entrenched enterprise pipelines and works anywhere β including air-gapped, on-prem environments. Many DevOps roles still list Jenkins as a requirement.
See It Yourself
The quickest way to try Jenkins is with Docker:
docker run -d --name jenkins \
-p 8080:8080 -p 50000:50000 \
-v jenkins_home:/var/jenkins_home \
jenkins/jenkins:ltsOpen http://localhost:8080, paste that initial password, and youβre in β the volume keeps your setup across restarts.
π§ͺ Hands-on Lab
Run Jenkins Locally
- Start the official Jenkins LTS container with a persistent volume
- Retrieve the initial admin password from the logs
- Explain why the controller shouldnβt run heavy builds itself
π§ Knowledge Check
In Jenkins' architecture, what is the role of an agent?
Where does most of Jenkins' functionality come from?
πΌ Interview Preparation
When would you choose Jenkins over a cloud-native CI tool?
Summary
You now understand what Jenkins is, its controller/agent architecture, the central role of plugins, and how it compares to cloud CI. Next, youβll set it up and create your first job.