Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-50645

Post failure condition should be evaluated after other conditions

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      The post "failure" condition fires after the "always" condition (and I number of others), but before the "success" condition and "aborted" conditions.  This means that if there is a failure in the "always" condition steps, the "failure" condition steps will fire.  But if there is a failure in the "success" condition steps, the "failure" condition steps will not fire. 

      This would make sense if the the "failure" condition only fired if the stage steps failed but never fired if one of the post condition steps failed.  But that is not the case.

       

        Attachments

          Issue Links

            Activity

            Show
            abayer Andrew Bayer added a comment - PR up at https://github.com/jenkinsci/pipeline-model-definition-plugin/pull/266
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Andrew Bayer
            Path:
            pipeline-model-definition/src/main/groovy/org/jenkinsci/plugins/pipeline/modeldefinition/model/conditions/Failure.groovy
            pipeline-model-definition/src/main/groovy/org/jenkinsci/plugins/pipeline/modeldefinition/model/conditions/Success.groovy
            pipeline-model-definition/src/main/groovy/org/jenkinsci/plugins/pipeline/modeldefinition/model/conditions/Unstable.groovy
            pipeline-model-definition/src/test/java/org/jenkinsci/plugins/pipeline/modeldefinition/BuildConditionResponderTest.java
            pipeline-model-definition/src/test/resources/postFailureAfterSuccess.groovy
            pipeline-model-definition/src/test/resources/postFailureAfterUnstable.groovy
            http://jenkins-ci.org/commit/pipeline-model-definition-plugin/7e0eaf4b300cd98b6754d940dbad19c5d51de5b2
            Log:
            [FIXED JENKINS-50645] Move failure to run after other status checks

            This way failure will still evaluate even if the actual failure
            doesn't occur until in the success or unstable blocks.

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Andrew Bayer Path: pipeline-model-definition/src/main/groovy/org/jenkinsci/plugins/pipeline/modeldefinition/model/conditions/Failure.groovy pipeline-model-definition/src/main/groovy/org/jenkinsci/plugins/pipeline/modeldefinition/model/conditions/Success.groovy pipeline-model-definition/src/main/groovy/org/jenkinsci/plugins/pipeline/modeldefinition/model/conditions/Unstable.groovy pipeline-model-definition/src/test/java/org/jenkinsci/plugins/pipeline/modeldefinition/BuildConditionResponderTest.java pipeline-model-definition/src/test/resources/postFailureAfterSuccess.groovy pipeline-model-definition/src/test/resources/postFailureAfterUnstable.groovy http://jenkins-ci.org/commit/pipeline-model-definition-plugin/7e0eaf4b300cd98b6754d940dbad19c5d51de5b2 Log: [FIXED JENKINS-50645] Move failure to run after other status checks This way failure will still evaluate even if the actual failure doesn't occur until in the success or unstable blocks.
            Hide
            abayer Andrew Bayer added a comment -

            Merged, will be in 1.2.10.

            Show
            abayer Andrew Bayer added a comment - Merged, will be in 1.2.10.

              People

              • Assignee:
                abayer Andrew Bayer
                Reporter:
                bitwiseman Liam Newman
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: