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.

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

          [JENKINS-41943] DP should have an easy way to say don't run subsequent steps if result is set.

          James Nord created issue -
          Jesse Glick made changes -
          Link New: This issue relates to JENKINS-27092 [ JENKINS-27092 ]
          James Nord made changes -
          Summary Original: DP should have an easy way to say don;t run subsequent steps if result is set. New: DP should have an easy way to say don't run subsequent steps if result is set.
          James Nord made changes -
          Description Original: 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 remebmer to put the following on every stage - which is cumbersome and error prone.

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

          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...
          New: 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.

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

          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...
          Andrew Bayer made changes -
          Link New: This issue duplicates JENKINS-42039 [ JENKINS-42039 ]
          Andrew Bayer made changes -
          Resolution New: Duplicate [ 3 ]
          Status Original: Open [ 1 ] New: Resolved [ 5 ]
          CloudBees Inc. made changes -
          Remote Link New: This issue links to "CloudBees Internal OSS-1976 (Web Link)" [ 18487 ]
          CloudBees Inc. made changes -
          Remote Link New: This issue links to "CloudBees Internal CJP-6350 (Web Link)" [ 19233 ]
          Liam Newman made changes -
          Status Original: Resolved [ 5 ] New: Closed [ 6 ]

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

              Created:
              Updated:
              Resolved: