List the `post` conditions and when each fires.
IntermediateConceptDeclarative pipeline syntax
Answer
| Condition | Fires when |
|---|---|
always |
Every time |
changed |
Result differs from the previous build |
fixed |
Now SUCCESS, previous was FAILURE or UNSTABLE |
regression |
Now FAILURE, UNSTABLE or ABORTED, previous was SUCCESS |
aborted |
ABORTED |
failure |
FAILURE |
success |
SUCCESS |
unstable |
UNSTABLE |
unsuccessful |
Anything other than SUCCESS |
cleanup |
After all others, regardless of result |
post can sit at pipeline level or stage level.
More on Declarative pipeline syntax
What is the minimum valid declarative pipeline?BeginnerWhat agent types exist in declarative pipelines?IntermediateWhen do you use `agent none` at the top level?IntermediateHow do nested sequential stages work and why are they useful?IntermediateWhat are the most useful `when` conditions?IntermediateWhat do `beforeAgent`, `beforeInput` and `beforeOptions` do inside `when`?Advanced