Automation · Jenkins
Jenkinsfile
Cheat sheet · https://pcornel.dk/topic.php?topic=5538
Answer
A Jenkinsfile is the pipeline definition stored in the project's repository, so the build process is versioned and reviewed alongside the code.
Remember
- The Jenkinsfile lives in the project repository.
- Pipeline changes are reviewed like code.
- Multibranch pipelines build each branch.
First checks
- Jenkinsfile in repo root — location
curl -X POST -F 'jenkinsfile=<Jenkinsfile' https://<jenkins>/pipeline-model-converter/validate— validate declarative syntax- Shared library usage — reuse
Verify in this order
Jenkinsfile → validation → pipeline
Where it usually breaks
Input/desired state → request accepted → job/task terminal status → target object read-back → effective runtime state → original workload → regression/rollback readiness.
Read-only verification commands unless stated otherwise. Confirm syntax for your platform and release. Full reference: https://pcornel.dk/topic.php?topic=5538