use of org.jenkinsci.plugins.workflow.cps.replay.ReplayAction in project blueocean-plugin by jenkinsci.
the class PipelineRunImpl method replay.
@Override
public BlueQueueItem replay() {
ReplayAction replayAction = run.getAction(ReplayAction.class);
if (replayAction == null) {
throw new ServiceException.BadRequestExpception("This run does not support replay");
}
Queue.Item item = replayAction.run2(replayAction.getOriginalScript(), replayAction.getOriginalLoadedScripts());
BlueQueueItem queueItem = QueueContainerImpl.getQueuedItem(item, run.getParent());
if (queueItem == null) {
throw new ServiceException.UnexpectedErrorException("Run was not added to queue.");
} else {
return queueItem;
}
}
Aggregations