Automation · Jenkins
Steps
Cheat sheet · https://pcornel.dk/topic.php?topic=5542
Answer
Steps are individual actions inside a Jenkins stage, such as sh, bat, git, junit or archiveArtifacts, provided by Jenkins core and plugins.
Remember
- Steps include sh, bat, git, junit, archiveArtifacts.
- They come from core and plugins.
- A non-zero exit fails the step.
First checks
- sh/bat/powershell steps with error handling — commands
- withCredentials blocks — secrets
- Step timeouts/retry — resilience
Verify in this order
step → action → result
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=5542