PeteGoo / tcSlackBuildNotifier

Posts build notifications to Slack
MIT License
311 stars 79 forks source link

tcSlackBuildNotifier

Deprecation notice

This project is no longer actively maintained - JetBrains has added Slack functionality to TeamCity 2020.1

Join the chat at https://gitter.im/PeteGoo/tcSlackBuildNotifier

Overview

Posts Build Status to Slack

Sample Notification Sample Notification

Tested on TeamCity 8.1.2 (build 29993), 9.1 (build 36973)

Installation

Head over to the releases section and get the zip labelled tcSlackNotifierPlugin.zip from there (do not download the one on this page). Copy the zip file into your TeamCity plugins directory.

You will need to restart the TeamCity service before you can configure the plugin.

Configuration

Once you have installed the plugin and restarted head on over to the Admin page and configure your Slack settings.

Admin Page Configuration

Sample Auth Token

Usage

From the Slack tab on the project or build page (not the Build Configuration Settings page), add a new Slack Notification and you're away!

Sample Build Configuration

Mentions

In order to receive mentions and direct messages from the notifier you must go to your profile page in TeamCity and tell it your Slack username (no need to include the @). Once you have done this you can be mentioned on failed builds. You can also subscribe to notifications on your profile page.

Contribution

In order to contribute to the project you first need to checkout the project sources. This project uses the TeamCity Plugin SDK for development.

In order to test the plugin simply run the following command with java and mvn installed:

mvn package tc-sdk:start

By default it will install TeamCity in the version listed in the property in the root pom.xml. However you can overwrite this setting by using the -DteamcityVersion=10.0 switch.

Other available commands can be found here.