Step executes on success despite execution policy
Answered
Hi All,
I have a build pipeline in Teramcity, which includes a step to send an alert to MS teams, based off a meta-runner. However, I set this step to "execute even if some of the previous steps failed", but the step executes even on a success. Is there a way to change this to run only on failure?
Please sign in to leave a comment.
Hello Gurdip,
This option is designed to make step run in all cases, both when the build is running fine and when it has failed on the earlier step. There is a request to add a separate policy, which would make step execute only when the build is failing - https://youtrack.jetbrains.com/issue/TW-24782; please consider voting or commenting on it.
As a quick follow-up, the same behavior may be created in the current versions of TeamCity - please see this comment for an example. The task is made easier with the conditional build steps feature introduced in 2020.1.