title: Rerun only the failed stages in Jenkins
body: <p>I have a declarative pipeline, where each stage has several parallel stages. After triggering the pipeline, it looks something like this,
  <a href="https://i.stack.imgur.com/ppRxc.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/ppRxc.png" alt="enter image description here" /></a></p>
  <p>Now, what I want is, after the build is completed, if any of the stage, running parallel, gets failed, I will rerun those failed stages only. Not the whole suite. For instance, in &quot;Meta Data Creation&quot; stage, if 'Activity Category Type' and 'Campaign' stage get failed, I will rerun only those two stages. I don't want to rerun the other parallel stages inside of the Meta Data Creation, that are passed.
  I've tried &quot;Restart from stage&quot; option in Jenkins UI. But, it won't run the specific failed stages only. I've also tried Retry{} block. But, it halts the pipeline, when an error occurs. And the pipeline won't go forward until that specific stage is fixed.</p>
  <p>So, is there a workaround, where I can revisit the pipeline after it's completed and rerun only the failed stages? [No successful stages will be run]</p>
  <p>I've read several other questions here, but none of them had a relevant answer.
  Thanks in advance.</p>