Run step only if build status is failed

Hello,

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 ?

Thanks,
Olivier

2 comments

Hi Olivier,

This build feature is not implemented, please vote for the request https://youtrack.jetbrains.com/issue/TW-24782.
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.

0

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.

Olivier

0

Please sign in to leave a comment.