
Core Jenkins concepts
| Concept | Purpose | Notes / Best practice |
|---|---|---|
| Jobs | A job is Jenkins’s basic unit of work; it performs tasks like compiling code, running tests, packaging artifacts, or deploying. | Each run of a job is a build. Keep build history for auditing and troubleshooting. |
| Project types | Define how you express jobs. | - Freestyle projects: flexible, UI-driven. - Pipelines: defined in a Jenkinsfile (pipeline-as-code), versionable and easier to review. |
| Jenkinsfile / Pipeline structure | Describes the automated workflow as code. | Pipelines are composed of stages (e.g., build, test, deploy) and steps. Store Jenkinsfile in your repo to enable reproducible pipelines. |
| Nodes (controller & agents) | Machines that run Jenkins tasks. | The controller (formerly called “master”) coordinates builds and serves the UI; agents (workers) execute build steps. Use multiple agents to distribute and scale work. |
| Plugins | Extend Jenkins to integrate with SCMs, test systems, cloud platforms, notifications, and more. | Plugins enable most integrations but require lifecycle management (updates and compatibility checks). |
Familiarize yourself with these concepts before writing or migrating pipelines — they shape how you design CI/CD workflows with Jenkins.
How the Jenkins pipeline typically runs
- Developer pushes code to Git.
- Repository webhook or polling triggers Jenkins.
- Jenkins clones the repository and runs the pipeline defined in the
Jenkinsfile. - Pipeline stages execute (for example: build → unit tests → integration tests → package → publish).
- If tests pass and artifacts are produced, the pipeline can build a Docker image and deploy to the target (Kubernetes, cloud VM, etc.).
- Jenkins notifies the team of success or failure, closing the feedback loop.
Advantages and disadvantages
| Pros | Cons |
|---|---|
| Open source with a large community and many integrations. | Steeper learning curve compared to some newer hosted CI tools. |
| Highly customizable through a rich plugin ecosystem. | Maintenance overhead: you must manage Jenkins server, OS, and plugin updates. |
| Scriptable with Groovy for complex logic and conditional flows. | Performance may degrade on single-server setups; scaling requires additional architecture and configuration. |
Pipeline-as-code with Jenkinsfile for versioned, reviewable pipelines. | Security and operations are the user’s responsibility (patching, backups, access controls). |
| Mature features: parallel builds, artifact handling, and detailed reporting. | Self-hosted nature means you need to provision and operate infrastructure. |

Because Jenkins is typically self‑hosted, plan and budget for ongoing maintenance: OS and plugin updates, backups, secure credential storage, access controls, and monitoring are essential to keep your CI/CD pipeline reliable and secure.
Jenkinsfile, deciding how to provision agents (static vs. dynamic), and adopting secure practices for credentials, secrets, and plugin management. For more details, consult the official Jenkins documentation and plugin-specific guides.