2

I am using classic editor release pipeline and the requirement is to run a 'send email' task when a specific task fails. How can we configure custom condition for this requirement?

When we use the Azure provided condition 'Only when a previous task has failed', the task is getting executed if any of the previous task has failed. Hence, requirement is not met. ie if there are three tasks A,B,C and the requirement is to trigger C only when B fails, using 'Only when a previous task has failed' as condition will trigger C even when A fails.

Please help with the steps to configure custom condition for this requirement.

enter image description here

Sneha Dominic
  • 368
  • 2
  • 14

1 Answers1

0

The powershell to roll back task has a way to download the job status and you can use it to look at the status of all individual tasks in a job. I'm not 100% sure this works with the most recent iterations of the Azure Pipelines, but it sure is a way to start:

https://marketplace.visualstudio.com/items?itemName=ms-devlabs.utilitytasks

jessehouwing
  • 106,458
  • 22
  • 256
  • 341