Skip to content
Kristian Adrup edited this page Aug 24, 2015 · 1 revision

TfsNotificationRelay is a server side plugin which is installed by copying a few assemblies and a config file to the plugins directory of a TFS application tier. TFS 2013 is found in C:\Program Files\Microsoft Team Foundation Server 12.0 and TFS 2015 in C:\Program Files\Microsoft Team Foundation Server 14.0.

Installation

  1. Download the latest release or clone and build the source yourself. There are separate releases for TFS 2013 and TFS 2015, be sure to pick the correct one for your system.
  2. Edit DevCore.TfsNotificationRelay.dll.config and set the parameters needed, see Slack and HipChat specifics below. The config file has a few example bot configurations.
  3. Drop DevCore.TfsNotificationRelay.dll, DevCore.TfsNotificationRelay.dll.config, Newtonsoft.Json.dll (TFS 2013 only), HtmlAgilityPack.dll (TFS 2013 only) plus DevCore.TfsNotificationRelay.Slack.dll and/or DevCore.TfsNotificationRelay.HipChat.dll in Application Tier\Web Services\bin\Plugins. If you want notifications on vNext builds (TFS 2015), you also have to drop the dll:s in Application Tier\TFSJobAgent\Plugins and restart the Visual Studio Team Foundation Background Job Agent.

Slack

The Slack integration has two different notifiers, one that send messages to channels via an incoming webhook and another one that sends direct messages to users via the Slack API.

Channel notifications (SlackNotifier)

  1. If you don't already have one, add an Incoming WebHook in Slack.
  2. Set your full unique Webhook URL in slackWebhookUrl in DevCore.TfsNotificationRelay.dll.config.

Direct message notifications (DirectMessageNotifier)

  1. Add a new Bot in Slack and customize name and icon.
  2. Set the API token in token in DevCore.TfsNotificationRelay.dll.config.
  3. To be able to send DM:s, the domain users need to be mapped to Slack users. Get list of Slack users with the following request: https://slack.com/api/users.list?pretty=1&token=<token> and map the users in the config.

HipChat

  1. Create a room notification token for the HipChat room that you want to send notifications to.
  2. Set roomNotificationToken and the corresponding room setting in DevCore.TfsNotificationRelay.dll.config.

IRC

See TfsBot.