Azure DevOps. Get Discord Notification on Specific Pipeline Failure

Viewed 317
1 Answers

You can use the Discord Webhook extension that give you a task to send messages to Discord during your pipeline.

When creating a webhook for a channel in a Discord server, you will be given a url which contains the Channel ID and the Secret Key for that webhook in this format: https://discordapp.com/api/webhooks/{channelId}/{webhookKey}.

You will not need to provide the url to the task, but rather just the Channel ID and Secret Key. (The first section in the link above, Making a Webhook, is all that needs to be followed to be able to use this task).

More info you can find here.

After you know which values put in the task you can dd it to your pipeline and configure it to run only if the pipeline failed with the condition failed().

Related