Overview
This project has been deprecated.
This project is a plugin to post build and other TeamCity server events to a HipChat chat room. Fast and direct feedback from your continuous integration server is vital in responding to build problems. This plugin does not only use colour to make the type and status of a build and other notifications clear, but also uses HipChat’s emoticons for added entertainment. Message templates can be tweaked to suit your taste.
Download
Features
This plugin supports version 2 of the HipChat API. Simply create a user account for the build server on HipChat and generate an API token for that user. Use this information to configure the plugin under TeamCity’s administration panel. All your available rooms will be visible on the plugin’s configuration page to choose from. Visual and audible alerts are controlled with the trigger option and you can choose which build and server events to send notifications for.
These are the events that are currently supported, with their information levels and colours. These events can be enabled or disabled globally.
- Server start-up and shutdown: gray (neutral)
- Build started: yellow (information)
- Build successful: green (success)
- Build failed: red (error)
- Build interrupted: purple (warning)
There are three sets of emoticons that were hand picked from the standard HipChat emoticons: positive, negative and neutral (or meh) emoticons. The events above are mapped accordingly and an emoticon is picked randomly from the applicable set for every build event.
The default notification messages contain links to the project and build and branch information will be included, if available. It will also mention who triggered the build and who contributed to it. These messages can be customised to taste and support the FreeMarker syntax and may contain any HTML that’s supported by the HipChat API.
- ${serverUrl}: The server’s base URL, e.g. http://localhost:8111/.
- ${projectId}: The external project ID.
- ${fullName}: The full name of the build configuration, including the full project hierarchy, e.g. Test Project :: Test Build Config.
- ${branch}: The repository branch.
- ${buildId}: The unique internal build ID.
- ${buildTypeId}: The build configuration’s ID.
- ${buildNumber}: The build number as configured for the build configuration, e.g. 3.2.1.456.
- ${triggeredBy}: The user that triggered the build.
- ${contributors}: A list of contributor names.
- ${emoticonUrl}: The URL to an emoticon, as determined by the plugin according to the build status.
- ${cancelledBy}: The user that cancelled the build.
- ${noOfTests}: The total number of tests in the build.
- ${noOfPassedTests}: The number of successful tests in the build.
- ${noOfFailedTests}: The number of failed tests in the build.
- ${noOfNewFailedTests}: The number of tests that failed since the last build.
- ${noOfIgnoredTests}: The number of ignored tests in the build.
- ${durationOfTests}: The duration of all tests in milliseconds.
An addition, all other build and agent parameters can be used in templates by referencing them like this: ${.data_model[“system.teamcity.version”]}, which in this case will render as 8.1.1 (build 29939). Any available build statistics (e.g. code coverage, code duplication, etc.) can also be referenced with a stats prefix, e.g. ${.data_model[“stats.myKey”]}. The exact available variables will vary, so enable debug logging to see what’s available in your environment.
For large build server setups, you can choose a specific room for a particular project to send notifications too. This is configured on the HipChat tab when viewing a project. Depending on your needs, you can set the default room to none and only set rooms for projects that must send notifications. Conversely, you can set a default room, and specifically disable notifications for certain projects. It is also possible to configure a project to use the default (global) or parent project’s configuration.
The plugin will also use TeamCity’s proxy configuration for outgoing connections, if enabled.
Lastly, the plugin supports sending notifications to a stand-alone HipChat server. It is recommended that you install a valid SSL certificate on your HipChat server, but otherwise (e.g. for testing purposes), the SSL certificate verification can be disabled on the administration page.
Software
The project is hosted on GitHub where you can download the latest release.
Download