This feature is available from version 1.9.2
Sometimes a build stage may fail due to external influences - it could be that a file server was offline, network connectivity was down, or a file was locked for access. If it has taken several long stages to get to this point, then having to run the whole build again from the start can be a pain.
Providing that the server workspace is intact and the last stage of a completed build has failed, stopped or errored, it can be requeued. If no parts of the server workspace have been removed by the cleanup process, then a Requeue Stage button will be shown after the last stage in the Stages list on the Build page.
Clicking on the Requeue Stage button with open a confirmation dialog before restarting the build, and adding the stage to the queue.
Any configuration conditions will be skipped, but all configuration and stage shared resource locks will be acquired before the stage is executed.
A new Stage, with the suffix "(rerun)" added to its name, will be added to all Stages lists and in the build log, to represent the requeued stage.
Once the new stage is complete, it can be requeued again and again.
If the new Stage is successful, the build will continue on to the next stage as usual.
Requeueing a stage with changes
Sometimes a stage will fail due to a small typo or incorrect field value. What if you could edit the stage and then rerun it?
When you requeue a stage, if any changes have been made to the configuration since the stage was last run, you will be given the option to requeue the latest version of the stage. The latest stage actions will then be added to the queue.
For a stage to requeued, the server workspace needs to be intact. If any of the workspace files have been removed due to the cleanup settings, then the Requeue Stage button will not be available. Ensure that you adjust the cleanup rules for any configurations for which you may need to requeue stages.