By default, Azure DevOps sends an email notification to team members after the compilation succeeds or fails. But in a CI/CD environment, we are more concerned about when the deployment is complete and then conducting manual or automated testing. Let's take a look at how to get Azure DevOps to automatically send mail notifications to team members after a successful deployment.
Enter Project settings in the bottom of the left sidebar.
Choose Notifications > New subscription
Click Release > A deployment is completed
The default settings are to send mail to all members of the current project when the deployment is complete. Specific settings can be changed according to your project needs, such as adding filtering criteria, selecting the Role of Notification member, and so on. Then click Finish to complete the configuration.
When you're done, you should be able to see this custom notification rule at the bottom of the list.
Now, trigger a deployment. If all goes well, you should be able to receive a similar email notification. I currently have two environments, and according to the configuration just now, any deployment on both environment will be notified. This is the staging environment:
Swapnil
I am having a task for running the automation script written in java using selenium, and I want the result to be mailed after the deployment process. How can I achieve that?
Simon
Very useful, thanks. It's not very intuitive that release notifications are in Project Settings, or that I had to add a New Subscription to create one.
Pankaj Devrani
@Swapnil, you can use one of the azure devops pipeline tasks to achieve that.
Gaurav Joshi
this process for entire release what if we have to send email for specific stages failure..? Any help would be helpful.