Customizing TeamCity notifiers’ templates
TeamCity users can get notifications on different events of the projects they are watching, such as build start and failure, notifications on successfully completed builds or changing of the person responsible for the build failure. TeamCity has a number of means of notifying users on such events:
- standard e-mail:
- Windows Tray Notifier for receiving notifications and monitoring the building process in the system tray:
- Jabber/XMPP protocol
- In IntelliJ IDEA: IDEtalk plugin and IntelliJ IDEA plugin for TeamCity:
- Eclipse plugin
In the latest EAP build, we have also implemented the RSS feed notification on finished builds of the particular build configuration.
All notifications have a standard layout but the administrators can customize the notification templates to better suit the needs of a particular project or the company’s typical workflow. You can access and modify these templates in a dedicated notifier configuration file (not in TeamCity web UI).
The notifier templates are stored in the notifier configuration file of TeamCity Data Directory. The syntax of the notifier configuration files is described in the *.dtd files and contains two customizable sections:
- <templates/> – specific templates with notification messages
- <events/> – the list of events to be notified on and referenced with the associated templates
All additional templates you want to be used are placed into the <templates> section, and each notifier type template must have a specific tag or sub-element or the notification text is put within the <template/> tag. All templates are attached to specific events such as build start, failure and others. Each notification event supports a specific set of substitution patterns. These are:
- “build_successful”, “build_failed”, “build_failing”
After you have modified the notifiers templates, TeamCity server applies changes on-the-fly.
One more notification event (also customizable) – the build is probably hanging – has appeared in one of the latest TeamCity 3.0 EAP builds.
The concrete examples of customizing the notifier templates are available in TeamCity online reference.
Subscribe to Blog updates
Thanks, we've got you!
How To Choose a CI/CD Tool: A Framework
In this blog post, we offer general guidelines for selecting an appropriate CI/CD solution and delve into how TeamCity fits into this framework.
Increase Your Productivity With TeamCity Documentation Examples for the Kotlin DSL
Take advantage of extensive Kotlin DSL documentation for TeamCity - now with examples! Read more about how it might increase your productivity in this blog post.
Monitor Your TeamCity Builds with Datadog CI Visibility
Datadog now offers deep, end-to-end visibility into your TeamCity builds with the new TeamCity integration for CI Pipeline Visibility.