Code changed in jenkins
User: Andrew Bayer
Path:
pipeline-model-definition/src/main/groovy/org/jenkinsci/plugins/pipeline/modeldefinition/model/AbstractBuildConditionResponder.groovy
pipeline-model-definition/src/main/groovy/org/jenkinsci/plugins/pipeline/modeldefinition/model/Root.groovy
pipeline-model-definition/src/main/groovy/org/jenkinsci/plugins/pipeline/modeldefinition/model/Stage.groovy
pipeline-model-definition/src/main/java/org/jenkinsci/plugins/pipeline/modeldefinition/model/BuildCondition.java
pipeline-model-definition/src/main/resources/org/jenkinsci/plugins/pipeline/modeldefinition/ModelInterpreter.groovy
pipeline-model-definition/src/test/java/org/jenkinsci/plugins/pipeline/modeldefinition/BuildConditionResponderTest.java
pipeline-model-definition/src/test/resources/postChecksAllConditions.groovy
http://jenkins-ci.org/commit/pipeline-model-definition-plugin/c1a77937ed5557da7d8796011c13888c05b08c8c
Log:
[FIXED JENKINS-40984] Always evaluate/run all post conditions
Even if there's an error in an earlier condition execution, continue
to the subsequent ones. Additionally, switch to doing a one-off check
at the beginning of the post section to see if any conditions are
satisfied at that time, and then when actually iterating through the
conditions, check for satisfaction at that time. That's so that, for
example, if the build is successful when it gets to evaluating post
conditions and then there's a failure in the execution of `always`,
the `success` block won't be executed, and the `failure` block will,
since the build status has changed.
Interesting question this poses - if post/always fails, but the build was successful up until then, should post/failure be called or post/success?