Add a when condition for "the build hasn't failed or gone unstable etc"

This issue is archived. You can view it, but you can't modify it. Learn more

XMLWordPrintable

      While poking around GitHub to see if I can find examples that would be broken by the current PR for JENKINS-52114, I'm running across a lot of Jenkinsfiles containing either expression or script with if (currentBuild.result == null || currentBuild.result == 'SUCCESS') or variants thereof. While there is the skipStagesAfterUnstable() option, and any actual failure (i.e., that isn't just something setting currentBuild.result directly) will prevent subsequent stages from being executed, I can see some merit in there being a when condition that just means "Run if the build is still successful/hasn't failed yet/hasn't gone unstable yet".

            Assignee:
            Unassigned
            Reporter:
            Andrew Bayer
            Archiver:
            Jenkins Service Account

              Created:
              Updated:
              Archived: