|You are viewing documentation of TeamCity 6.x, which is not the most recent released version of TeamCity. Please refer to the listing to choose another version.|
TeamCity provides a wide range of notification possibilities to keep developers informed about the status of their projects. Notifications can be sent by e-mail, Jabber/XMPP instant messages or can be displayed in the IDE (with the help of TeamCity plugins) or the Windows system tray (using TeamCity Windows tray notifier). Each user can select the events to receive notifications. The notification messages can be customized globally on per-server basis.
Notifications can also be received via Atom/RSS syndication feeds, but since feed use "pull" model for receiving notifications instead of "push", some of the approaches are different for the feeds.
TeamCity supports a set of events that can generate user notifications (such as build failure, build type responsibility changed, etc). On event occurrence, for each notificator type, TeamCity processes notification settings for all the users to define users that the notification should be sent to.
When the set of users is determined, TeamCity fills the notification model (the objects relevant to the notification as "build", responsibility data, etc.) and evaluates a notification template that corresponds to the notification event.
Please note that the template is evaluated once for an event which means that notification properties cannot be adjusted on per-user basis.
The output values defined by the template are then used by the notificator to send notification to the selected users.
Customizing Notifications Templates
Notification Templates Location
If there an error occurs during template evaluation, TeamCity logs the error details into
TeamCity notificators use templates to evaluate output values (global template variables) which are then retrieved by name. The following output values are supported:
IDE Notifications and Windows Tray Notifications
The Atom/RSS feeds template differs from the others. For the details, please refer to the dedicated section.
For the template evaluation TeamCity provides the default data model that can be used inside the template. The objects exposed in the model are instances of the corresponding classes from TeamCity server-side open API.
Here is an an example description of model (the code can be used in IntelliJ IDEA to edit the template with completion):
TeamCity notification properties
The following properties can be useful to customize the notifications behaviour:
Syndication Feed Template
The template uses different approach to configuration from other notification engines.
The default template is stored in the file:
The template is a FreeMarker template and can be freely edited.
You can use several templates on the single sever. The template name can be passed as a URL parameter of the feed URL.
During feed rendering, the template is evaluated to get the feed content. The resultant content is defined by the global variables defined in the temple.
See the defualt template for an example of available input variables and output variables.