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

Add ability to always run particular stages when restarting



    • Declarative backlog


      I would like to have the ability when restarting a pipeline to always execute a block before the restarted stages begin. The reasoning for this is that I may have some job setup that must always occur when restarting a particular stage.

      For example, consider the following:

      Setup -> Stage 1 -> Stage 2 -> Stage 3

      Let's say I would like to restart from Stage 2 but it needs the setup stage to function properly. Picking Stage 2 as the restart point would then trigger Setup, Stage 2, and then Stage 3.

      We already have a post block, so perhaps it would make sense to have a pre block that can be configured to run when a pipeline is restarted? Or perhaps you can just mark a stage to run even when restarted?

      I realize that it's probably a best practice to have each stage be modular and self-contained, but we have some data we must lay down on theĀ  node that is unique to each run and later stages depend on it. Currently, it's just the first stage in our pipeline and it does not run if we restart the pipeline at a later stage.

      We had a small discussion regarding this in JENKINS-51932.




            Unassigned Unassigned
            bdevcich Blake Devcich
            19 Vote for this issue
            22 Start watching this issue