| I've started playing around with this again, and it's more complicated than I'd like. Ensuring that the stages are executed after retry is actually pretty easy, but the problem is that if a stage errors out the first time through, the build as a whole will still be marked as a failure, because we set the build to failed as soon as we hit an error, and there's no way to undo that once we've set it. I have some ideas on how I can unravel this, but they'll require looking into everything that could be using currentBuild.result within Declarative and figuring out how we can cheat around that, or writing our own Declarative-specific retry logic that can avoid setting currentBuild.result when we're in a retry until we've hit the max attempts. So...yeah. More thought needed. |