Automation
Jenkins
Cheat sheet · https://pcornel.dk/topic.php?topic=5533
Answer
Jenkins is a self-hosted automation server for CI/CD. A controller schedules pipelines defined in Jenkinsfiles, and agents run the builds, extended by a large plugin ecosystem.
Remember
- Run builds on agents, not the controller.
- Keep plugins few and updated.
- Pipelines belong in Jenkinsfiles in Git.
First checks
curl -sS -u <user>:<api-token> https://<jenkins>/api/json?tree=jobs[name,color]— job status via API- Jenkinsfile in repos — pipelines as code
- Plugin update status — security
Verify in this order
SCM → Jenkinsfile → controller → agents → stages
Where it usually breaks
Automation/controller success is not target-state proof; target config/state is not effective-runtime proof; effective state is not workload proof.
→ Jenkins · operational reference
| Layer | Jenkins operational reference |
|---|---|
| Runtime/ownership | Jenkins Pipeline current · identify controller/worker/target ownership before mutation |
| Persistent intent | Versioned configuration/playbook/workflow with explicit dependencies and least-privilege identity |
| Verification | curl -fsS "$JENKINS_URL/job/$JOB/lastBuild/api/json" / jq "{number,result,building,url}" |
| Expected interpretation | The job/pipeline definition revision, controller, agent/node, build number and result are known, and any deployed target is verified independently. |
| Recovery boundary | Preserve correlation IDs + pre-state, then verify target/service independently after remediation |
Read-only verification commands unless stated otherwise. Confirm syntax for your platform and release. Full reference: https://pcornel.dk/topic.php?topic=5533