Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Azure Pipelines: Notification on Job failure

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.

like image 902
Tobias von Falkenhayn Avatar asked Oct 19 '25 04:10

Tobias von Falkenhayn


1 Answers

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()
like image 198
Shayki Abramczyk Avatar answered Oct 21 '25 01:10

Shayki Abramczyk



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!