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

DP should have an easy way to say don't run subsequent steps if result is set.

XMLWordPrintable

      If I have a pipeline with a lot of stages

      • run unit tests
      • run smoke tests
      • run quick ATH
      • run slow ATH
      • deploy to staging
      • run UAT
      • run even more tests

      If anything sets the build result to anything other than SUCCESS in one of the stages (e.g. unit test failures and junit plugin -> UNSTABLE) then I do not want to run the subsequent tests.

      Currently I have to remember to put the following on every stage - which is cumbersome and error prone.

      when { expression { currentBuild.result == null } }
      

      It would be useful if there was a config option like skipSubsequentStagesWhenNotSucessfull : true at the top level which could be overridden by a stage if needed (e.g. a final reporter stage...)

      Obviously the configuration name above is bad - but just for example...

            abayer Andrew Bayer
            teilo James Nord
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: