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

Ability to skip stages and preserve build history

      It would be nice, when you can skip single stages in a pipeline without losing the build history in the visualization.

      At the moment I have two choices:

      • Skip the complete stage: The whole build history in the visualization will be lost.
      • Execute the stage but not the content: The build history is preserved, but the stage color will be the same as the rest of the stage. It should be clear, that the stage content wasn't executed. Maybe there could be a step to set the stage status and so change the color of the stage (just an idea).

          [JENKINS-49121] Ability to skip stages and preserve build history

          Jeff G added a comment -

          Using declarative pipeline, we have when expressions on the stages to skip certain stages (e.g. publishing artifacts when it is a pull request build).  The stage still appears in the stage view but is gray.  This might work for you if you use declarative pipeline.

          Jeff G added a comment - Using declarative pipeline, we have when expressions on the stages to skip certain stages (e.g. publishing artifacts when it is a pull request build).  The stage still appears in the stage view but is gray.  This might work for you if you use declarative pipeline.

          For scripted pipelines there is a non-official/non-public-API workaround: please see JENKINS-47286 (and https://github.com/comquent/imperative-when)

          It would be really great if that would become a public API (or some public API call that for now calls that non-public method in the meantime)...

          Reinhold Füreder added a comment - For scripted pipelines there is a non-official/non-public-API workaround: please see JENKINS-47286 (and https://github.com/comquent/imperative-when ) It would be really great if that would become a public API (or some public API call that for now calls that non-public method in the meantime)...

            Unassigned Unassigned
            jochenafuerbacher Jochen A. Fürbacher
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: