Search code examples
azure-devopsazure-pipelinesslack

Get notified of Build or Release that failed


I have integrated Azure pipelines with out team slack channel which is nice, it tells us when a build completes and release deploys. The really bad thing about it though is is doesn't report when a build or release failed which is arguably more important information.

I went into settings to try to see if there is any event for it but it seems the answer is no. Also I looked to see if it can be done with something else like Zapier but I couldn't see how.

How can I configure pipelines so our team is all notified of a broken build or failed release?


Solution

  • As Guerrilla said, you should use the official application to integrate Slack into Azure DevOps. https://learn.microsoft.com/en-us/azure/devops/pipelines/integrations/slack?view=azure-devops

    I recommend to use /azpipelines subscribe command to create new subscriptions (notifications for channels). The Slack UI provides better way to define what kind of notifications you will receive.

    azpipelines subscribe command gives UI to define notifications

    This is how it looks in Slack Failed build in Slack

    The other way to do it is to use direct command /azpipelines subscribe https://dev.azure.com/myorg/myproject/_build?definitionId=123, but it doesn't give an option to define when notifications are sent.