What are Jenkins build statuses SUCCESS, UNSTABLE, FAILURE, ABORTED and NOT_BUILT?
BeginnerConceptJenkins
Answer
- SUCCESS: all steps passed.
- UNSTABLE: build ran but tests failed or a quality threshold was missed (yellow).
- FAILURE: a step errored (red).
- ABORTED: stopped by a user, a timeout, or a newer build.
- NOT_BUILT: skipped, for example because an upstream stage failed.
junit marks the build UNSTABLE when tests fail, so if you want a hard failure you must check currentBuild.result or use catchError/error.
More on Jenkins
What is Jenkins and how is its architecture organised?BeginnerWhat are executors, nodes and labels in Jenkins?IntermediateWhy should you not run builds on the Jenkins controller?BeginnerHow do inbound (JNLP/WebSocket) and SSH agents connect to the controller?IntermediateWhat is a Jenkinsfile and where does it live?BeginnerDeclarative versus Scripted Pipeline: what are the differences?Intermediate