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

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

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".

            Unassigned Unassigned
            abayer Andrew Bayer
            Votes:
            1 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: