Is it possible to send a e-mail notification if a specific job fails within an azure pipeline?
Basically, i a testing stage in my pipeline where several jobs run in parallel which execute different test suites. Each test suite has a different guy who is responsible and must be notified if it fails.
I could only find notification options on failing the whole pipeline, but that's not what I want to do.
I also don't create any work items at the moment, and I couldn't find a "send-email-task" or something like this.
I could of course write my own script and execute it if a job fails, but I want to know if there is an easier way to solve my problem.
I don't think there is an out-of-the-box option like this, but you can use Send Email extension:
- task: SendEmail@1
displayName: 'Send an email with subject Job A failed!'
inputs:
To: '[email protected]'
From: '[email protected]'
Subject: 'Job A failed!'
SmtpServer: 'my smtp server'
condition: failed()
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