I am trying to create a Visual Studio Team Services Extension Task for my builds and releases. I need a task that will send out an alert to another system if a previous task (including the default build/test/publish/etc.) fails.
I have already created the task to send the alert. However I do not see a way to kick off the task only if my build fails.
Is there a way in VSTS to run a task if a previous task fails, but not run it if all other tasks were successful?
It is now possible to select a running condition for all tasks with the following possible values:

EDIT:
It is currently part of a preview, you can enable it through the "Preview features" menu after you click on your profile click on VSTS:

And activate the "New Build Editor":

There is no built-in feature.
But you can use the "Rollback" task from the Release Management Utilities to run a powershell script on 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