TeamCity
Powerful CI/CD for DevOps-centric teams
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_started”
- “build_successful”, “build_failed”, “build_failing”
- “responsible_changed”
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.
Technorati tags: TeamCity, JetBrains, Java, .NET, IntelliJ IDEA, jabber, tray notifier, e-mail, continuous integration, build management, agile development, MS Visual Studio 2003