Run step only if build status is failed


I would like to run a build step only if the status of the build is failed. Unfortunately, in the build step configuration, there is only the option to run it "Only if build status is successful".
Is there other way, or a feature request ?


Comment actions Permalink

Hi Olivier,

This build feature is not implemented, please vote for the request
Current workaround is to pass a parameter to the next steps on successful build and then performing some logic in the step if the parameter is not set.
Another workaround is to do a REST call from within the build asking the server what the build status is and doing some logic based on the result.

Comment actions Permalink

Hello Alina,

I would prefer not to use the REST API because of the complexity.

But unfortunately, I don't think I can use the first workaround in my case, because the failures I have to deal with don't come from the build steps, but from failed dependencies.



Please sign in to leave a comment.