Jenkins is an open-source automation server that orchestrates continuous integration and continuous delivery (CI/CD) workflows through pipelines defined as code. Originally forked from Hudson in 2011, Jenkins powers CI/CD pipelines across millions of projects by executing builds, running tests, and deploying applications through a distributed architecture of controllers (formerly masters) and agents (formerly slaves). Its plugin ecosystem of 2000+ plugins — combined with Pipeline-as-Code via Jenkinsfiles stored in source control — enables teams to automate every stage from commit to production. A key mental model: Jenkins itself does almost nothing; all real work is delegated to agents, orchestrated by the controller, and expressed as code in a Jenkinsfile.
What This Cheat Sheet Covers
This topic spans 28 focused tables and 266 indexed concepts. Below is a complete table-by-table outline of this topic, spanning foundational concepts through advanced details.
Table 1: Pipeline Types
| Type | Example | Description |
|---|---|---|
pipeline { agent any stages { stage('Build') { steps { sh 'make' } } }} | • Structured syntax with predefined sections (pipeline, agent, stages, steps)• enforces best practices and provides clear validation errors; preferred for new pipelines. | |
node { stage('Build') { sh 'make' }} | • Groovy-based imperative syntax offering maximum flexibility for complex logic • uses node blocks; reserve for cases Declarative cannot handle. | |
Automatically scans repository for branches with Jenkinsfile | • Auto-discovers branches and PRs and creates sub-pipelines for each • single job definition manages unlimited branches. |