Notifications
The Notifications build feature is responsible for sending notifications about build statuses and events to external services. Currently, the feature comprises Email Notifier and Slack Notifier.
This feature compliments the functionality of project-level notifications that can be assigned to a particular user or user group.
The Notifications feature allows configuring notifications per build configuration. This approach does not require referencing a specific TeamCity user and works better for group notifications.
To set up similar notifications for several build configurations, use a build configuration template.
Common Settings
For each type of Notifier you can select events to watch and configure a branch filter. Note that if no branch filter is configured, you will receive notifications about the default branch only.
Email Notifier
The Email Notifier feature requires entering a target email only. For example, you can specify an email list address, and all its subscribers will be receiving build notifications automatically.
Note that TeamCity Email Notifier relies on the SMTP server settings configured in Administration | Server Administration.
Slack Notifier
The Slack Notifier feature relies on a Slack connection, preconfigured in the parent project's settings, and requires entering an ID of a channel or user who will be receiving notifications.
Configuring Slack Connection
To configure a connection to Slack, go to Project Settings | Connections and click Add Connection. In the opened form select the Slack type and give a connection any convenient name.
To be able to integrate TeamCity with Slack, you need to create a respective Slack app with the following scopes: channels:read
, chat:write
, im:read
, im:write
, users:read
, team:read
, groups:read
.
When configuring the app in Slack, make sure to add all possible endpoint addresses of your TeamCity server as Redirect URLs in OAuth & Permissions | App Management.
After creating the app, enter its parameters in the Add connection form in TeamCity:
Client ID and Secret from the app's Basic Information page
- bot user token