Webhooks and Email Notifications in Visual Studio App Center Build
We’re excited to announce the launch of build status notifications for Visual Studio App Center! Based on your feedback, we know some of you are customizing your build definitions to notify your team about the build status. Now you can say goodbye to these custom steps and simply use the email and webhook notifications feature in App Center to stay in the know.
Our team’s mission is to make app development as easy as possible for you and your team. Build is a key step in your Continuous Integration and Continuous Delivery (CI/CD) app development pipeline. As developers, you want to automatically be notified of your app’s build status and not have to continually log in to a portal for information. It’s useful to be able to notify multiple developers working on a project on the build’s status so that your team can quickly resolve issues before the problem escalates. For instance, as you continually build and make changes to your codebase, sometimes a build may work locally on one machine, but fail on the Build server. In this post, you’ll learn how to configure email and custom webhooks to get immediate updates on your builds in App Center.
Benefits of Setting up App Center Notifications
Email and custom webhook notifications give you continual real time updates of your build status, as well as the permanency and ability to search and be directed to your builds in App Center. This also enables faster collaboration, since you can forward the build status emails or @ mention collaborators in a chat or channel in a single workflow.
You can choose to have email and webhook notifications automatically sent for the following events:
- Build success:
- Always: When your app builds successfully
- Only if previously failed: When your app has successfully built after one or more failed builds
- Never: You will not receive notifications for build success
- Build failure:
- Always: When your app fails to build
- Only if previously successful: When your app has failed to build after one or more successful builds
- Never: You will not receive notifications for build failure
- Build success:
- ⚠ Crashes: When a crash group is created
- 🔱 Distribute: When a new version is released
By default, email notifications are sent only when a new version is released. Whether you’re an admin, app developer, or tester, it’s important to be notified immediately when a new version is released to testers or to the store. For admins or app developers involved in the Continuous Integration, Delivery and Deployment process, it’s useful to set up email and custom webhook notifications for build and distribute.
Setting up App Center Notifications
To get started, you need to have App Center’s Build service set up. I’ve onboarded the SmartHotel360 mobile demo app to our Build service by connecting my Visual Studio Team Services source code repository and triggering a build on the
Release branch on every push. You can read David Sanchez’s blog post to learn more about setting up a build for the SmartHotel360 app.
Set up Build Status Notifications
- Go to the app for which you’d like to configure email and webhook status notifications
- Navigate to the app’s Settings, and:
- To configure your email notifications, click Email notifications and select the events to trigger an email notification. Personally, I’m interested in when my build has succeeded or failed and when a crash group has happened.
Here is the documentation on how to configure your email notifications.
b. To configure a webhook, click New Webhook and enter your webhook name, URL, and select the events to trigger the webhook alerts.
In the example below, I’ve configured a Slack webhook:
3. Now, let’s kick off a new build!
Click Build, select the gear icon of the branch you’d like to build, and click
Save & Build.
4. After the build is completed, you’ll receive a build status email and webhook notification with the build details and a link to view the build.
Here’s an example of an email with a failed build:
You can click on the View link to view the build output details, distribute the app, and download the build or logs in App Center.
You’ll now be notified of your build status and can @ mention or email your developers to quickly fix failed builds before they reach more users. Awesome, crisis averted!
Get started and send us your feedback!
Log in to App Center (or create your free account today) and start kicking off builds, toggling your email notification settings, and configuring webhooks. We’re keen to hear what you’d like to see next, so send us your feedback on what worked (and what didn’t) for you.
Enjoy, and let’s get building! 😊