Continuous Integration Build Failure Notifications - Continuous Integration

What is Continuous Integration Build Failure Notification?

Whenever a build fails, an event is triggered, which is known as Build Failure Notification. Whenever the build fails, all the people receive the notification. In such cases, it is essential that time is spent on the failed build and make the build pass.

How Build Notifications are put in place in Teamcity?

Email Notifications are set up in TeamCity by the following steps:

Step 1 − In TeamCity, go to the Project dashboard, click on Administration in the top right hand corner. the Email Notifier link is seen in the left hand side. Click on this link to bring up the general settings for Email.

Email Notifier

Step 2 − Enter the details of a valid SMTP Server. Free SMTP facilities are provided by Gmail and enter the following details.

  • SMTP Host –
  • SMTP port no – 465
  • Send email messages from and SMTP login – This should be a valid Gmail id
  • SMTP password – Valid password for that Gmail id
  • Secure connection – Put this as SSL

SMTP Server

Step 3 − Click Test Connection to ensure that the settings are working properly. Then click Save to save the settings.

Step 4 − Enable build notifications for a user. Firstly a user is created who will receive the build notifications. In the project dashboard choose the Users Option.

Users Option

Step 5 – A new user is created. Provide the username and password. Click the Create User button, which will be located at the bottom of the screen.

Create User Button

Step 6 − Now login to the TeamCity system with the new user id and password.

TeamCity Login

Step 7 − After log in, General settings of the user are presented. In the Email Notifier section, click Edit.

General Settings of User

Step 8 − Next click Add new rule.

Add New Rule

Step 9 − In Add new rule, choose the following two options and then click Save.

  • Builds from select projects – Choose the Demo project.
  • Enable the checkbox for ‘Build fails’.

By enabling these two options, whenever a build fails for the Demo project, an email notification will be sent to the user – demouser.

Demo Project

Step 10 – A wrong build is triggered to see in action. In Visual Studio, go to the demo.aspx.cs file and add a wrong line of code.


Step 11 − Now check-in the code from Git by doing a git add and git commit.

Build Failure Git Add Command

In the Project Dashboard, the build is automatically triggered and it is observed that the build would have failed as shown below:

Project Dashboard Build Failure

If logged into the Gmail id of the demouser, a build failure notification appears as shown in the following screenshot.

TeamCity Build Demo

All rights reserved © 2018 Wisdom IT Services India Pvt. Ltd Protection Status

Continuous Integration Topics