MCPcopy Index your code
hub / github.com/PeteGoo/tcSlackBuildNotifier

github.com/PeteGoo/tcSlackBuildNotifier @v1.4.7

Chat with this repo
repository ↗ · DeepWiki ↗ · release v1.4.7 ↗ · + Follow
1,317 symbols 2,980 edges 82 files 29 documented · 2%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

tcSlackBuildNotifier

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

  • your default channel is the channel with the # in front of it e.g. #general.
  • your team name is the team e.g. mycoolteam NOT mycoolteam.slack.com.
  • The user token is available when you got to https://api.slack.com/web while logged in to your Slack instance. Under "authentication" you should see a token displayed like below. Alternatively you can use the full URL from the Incoming Webhooks integration in the API token field. The webhooks integration approach is sometimes more preferable as the token is not tied to a user account.

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

  • Remember to put the # in front of the channel name if applicable.

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.

Extension points exported contracts — how you extend this code

VariableResolver (Interface)
(no doc) [5 implementers]
tcslackbuildnotifier-core/src/main/java/slacknotifications/teamcity/payload/util/TemplateMatcher.java
SlackNotificationFactory (Interface)
(no doc) [3 implementers]
tcslackbuildnotifier-core/src/main/java/slacknotifications/teamcity/SlackNotificationFactory.java
SlackNotificationMockingFramework (Interface)
(no doc) [2 implementers]
tcslackbuildnotifier-core/src/test/java/slacknotifications/testframework/SlackNotificationMockingFramework.java
SlackNotification (Interface)
(no doc) [2 implementers]
tcslackbuildnotifier-core/src/main/java/slacknotifications/SlackNotification.java
BuildStateInterface (Interface)
(no doc) [2 implementers]
tcslackbuildnotifier-core/src/main/java/slacknotifications/teamcity/BuildStateInterface.java

Core symbols most depended-on inside this repo

replace
called by 108
tcslackbuildnotifier-core/src/main/java/slacknotifications/teamcity/payload/util/TemplateMatcher.java
jQuery
called by 66
tcslackbuildnotifier-web-ui/src/main/resources/buildServerResources/SlackNotification/js/jquery-1.4.2.js
enable
called by 61
tcslackbuildnotifier-core/src/main/java/slacknotifications/teamcity/BuildState.java
getContent
called by 56
tcslackbuildnotifier-core/src/main/java/slacknotifications/SlackNotification.java
enabled
called by 50
tcslackbuildnotifier-core/src/main/java/slacknotifications/teamcity/BuildState.java
disable
called by 32
tcslackbuildnotifier-core/src/main/java/slacknotifications/teamcity/BuildState.java
enabled
called by 25
tcslackbuildnotifier-core/src/main/java/slacknotifications/teamcity/settings/converter/OldStyleBuildState.java
setEnabled
called by 22
tcslackbuildnotifier-core/src/main/java/slacknotifications/SlackNotification.java

Shape

Method 1,136
Function 97
Class 78
Interface 5
Enum 1

Languages

Java93%
TypeScript7%

Modules by API surface

tcslackbuildnotifier-core/src/test/java/slacknotifications/teamcity/MockSBuildType.java175 symbols
tcslackbuildnotifier-core/src/test/java/slacknotifications/teamcity/MockSRunningBuild.java103 symbols
tcslackbuildnotifier-core/src/test/java/slacknotifications/teamcity/MockSProject.java82 symbols
tcslackbuildnotifier-core/src/main/java/slacknotifications/SlackNotificationImpl.java68 symbols
tcslackbuildnotifier-core/src/main/java/slacknotifications/SlackNotification.java49 symbols
tcslackbuildnotifier-core/src/main/java/slacknotifications/teamcity/settings/SlackNotificationConfig.java46 symbols
tcslackbuildnotifier-core/src/main/java/slacknotifications/teamcity/payload/content/SlackNotificationPayloadContent.java45 symbols
tcslackbuildnotifier-core/src/test/java/slacknotifications/teamcity/MockSBuildAgent.java44 symbols
tcslackbuildnotifier-core/src/main/java/slacknotifications/teamcity/settings/SlackNotificationMainConfig.java42 symbols
tcslackbuildnotifier-web-ui/src/main/resources/buildServerResources/SlackNotification/js/jquery-1.4.2.js39 symbols
tcslackbuildnotifier-web-ui/src/main/resources/buildServerResources/SlackNotification/js/jquery-1.4.3.min.js27 symbols
tcslackbuildnotifier-web-ui/src/main/java/slacknotifications/teamcity/extension/bean/SlacknotificationConfigAndBuildTypeListHolder.java27 symbols

For agents

$ claude mcp add tcSlackBuildNotifier \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page