Adding Notification Rules
This article explains how to set up notification rules. To learn how enable the notification functionality on your TeamCity server, follow these instructions.
Each notification rule consists of two parts: what scope will be watched and what events will trigger notifications. Users can create personal rules and inherit rules from their user group.
Add Notification Rule
To add a new personal notification rule:
In the upper right corner of the screen, click your avatar and click Profile in the drop-down menu.
In Your Profile, open the Notification Rules tab.
Click the required notifications type and configure the required settings.
Click Add new rule and specify the rule in the dialog.
What Will Be Watched
Events related to the following projects and build configurations
Select the projects / build configurations whose builds you want to monitor. Notification rules defined for a project will be propagated to its subprojects. To monitor all of the builds of all the projects' build configurations, select Root project.
Use the following options for granular control over the notifications in the selected projects / build configurations:
Select to be notified about investigations assigned to you.
Which Events Will Trigger Notifications
Check this option to receive notifications about all of finished failed builds in the specified projects and build configurations. If an investigation for a build configuration was assigned to someone while the build was in progress, the failed build notification is sent only to that user.
Note that if Builds with my changes only is selected in the Watch area, TeamCity will notify you if a build with your changes fails, and will keep sending notifications on each 'incomplete' build afterwards until a successful one. An incomplete build is a finished build which failed with at least one of the following errors:
Only notify on the first failed build after successful
Check this option to be notified about only the first failed build after a successful build or the first build with your changes. When using this option, you will not be notified about subsequent failed builds.
Only notify on new build problem or new failed test
Check this option to be notified only if a build fails with a new build problem or a new failed test.
Build is successful
Check this option to receive notifications when a build of the specified projects and build configurations executed successfully.
Only notify on the first successful build after failed
Check this option to receive notifications when only the first successful build occurs after a failed build. Notifications about subsequent successful builds will not be sent.
The first error occurs
Check this option to receive notifications about a "failing" build as soon as the first build error is detected, even before the build has finished.
Queued build requires approval
Check this option to receive notifications about a build requiring your approval. This option overrides the Builds with my changes only option.
Check this option to receive notifications as soon as a build starts.
Build fails to start
Check this option to receive notifications when a build fails to start.
Build is probably hanging
Check this option to receive notifications when TeamCity identifies a build as hanging.
Investigation is updated
Check this option to receive notifications on changing a build configuration or test investigation status, e.g. someone is investigating the problem, or problems were fixed, or the investigator changed.
Tests are muted or unmuted
Check this option to receive notifications on the test mute status change in the affected build configurations.
Investigation assigned to me
This option is available only if the System wide events option is selected in the Watch area. Check the option to be notified each time you start investigating a problem.
Rules Processing Order
TeamCity applies the notification rules in the order they are presented. TeamCity checks whether a build matches any notification rule, and sends a notification according to the first matching rule; the further check for matching conditions for the same build is not performed. You can reorder the configured notification rules.
The user rules are applied first, then the group rules are applied.
The group rules are processed in hierarchical order: starting from child groups to parent ones.
If there are more than one parent with their own rules set, the inherited rules are processed top-to-bottom corresponding to the order they are presented on the Notification Rules user profile tab (alphabetically).
Unsubscribing and Overriding Existing Rules
You may already have some notification rules configured by your System Administrator for the user group you're included in.
To unsubscribe from or override group notifications, add your own rule with the same watched builds and different notification events.
To unsubscribe from all events, add a rule with the corresponding watched builds and no events selected.