Is there a way to restart only a failed stage in the Jenkins parallel pipeline. I have to restart entire pipeline just for one failure now.
The failure could be a genuine failure. We do not want to retry ans waste time. The idea here is to quickly check what the issue is, correct it and restart the stage.
Without knowing much into this specific problem and what exactly is causing the failure, one simple solution is to wrap your pipeline script/stage within
retry(3){
sh './abc.sh'
}
This will ensure that the script/stage will be retried 3 times, before jenkins marks it as a failure.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With