All Projects → alexkvak → Teamcity Slack

alexkvak / Teamcity Slack

Licence: mit
TeamCity Slack plugin

Programming Languages

scala
5932 projects

Labels

Projects that are alternatives of or similar to Teamcity Slack

Errdo
A simple plugin to handle, log, and customize production errors in Rails applications
Stars: ✭ 88 (-21.43%)
Mutual labels:  slack
Gocd Slack Build Notifier
GoCD (gocd.org) plugin to push build notifications to Slack
Stars: ✭ 96 (-14.29%)
Mutual labels:  slack
Block Slack Users
Hide messages from users and bots, make Slack a Happy Place Again! 😁
Stars: ✭ 105 (-6.25%)
Mutual labels:  slack
Slack Machine
A sexy, simple, yet powerful and extendable Slack bot
Stars: ✭ 91 (-18.75%)
Mutual labels:  slack
Slackin Extended
Public Slack organizations made easy (extended fork of rauchg/slackin)
Stars: ✭ 95 (-15.18%)
Mutual labels:  slack
Parrot
A package to rotate text and party with parrots at the same time
Stars: ✭ 99 (-11.61%)
Mutual labels:  slack
Emojipacks
CLI to bulk upload emojis to your Slack
Stars: ✭ 1,275 (+1038.39%)
Mutual labels:  slack
Slack Bundle
Symfony bundle integration of the nexylan/slack library.
Stars: ✭ 110 (-1.79%)
Mutual labels:  slack
Channelsurf
Move from Slack to Microsoft Teams and manage your Teams environment
Stars: ✭ 96 (-14.29%)
Mutual labels:  slack
Slack Notifier
A simple wrapper for posting to slack channels
Stars: ✭ 1,441 (+1186.61%)
Mutual labels:  slack
Slack Emoji
My slack emoji collection and download script
Stars: ✭ 91 (-18.75%)
Mutual labels:  slack
Slack cleaner2
📝 Python3 module for deleting Slack messages and files using the Slack REST API
Stars: ✭ 92 (-17.86%)
Mutual labels:  slack
Ravenx
Notification dispatch library for Elixir applications
Stars: ✭ 100 (-10.71%)
Mutual labels:  slack
Slack Docker
Slack/Mattermost Integration for notifying Docker events, written in Go
Stars: ✭ 90 (-19.64%)
Mutual labels:  slack
Slack Dark Mojave Theme
Beautiful dark theme for slack 3, 4+. Apply theme by running one command 🌸
Stars: ✭ 107 (-4.46%)
Mutual labels:  slack
Code Pipeline Slack
Slack bot for code pipeline deployments
Stars: ✭ 88 (-21.43%)
Mutual labels:  slack
Slack Autoarchive
If there has been no activity in a channel for awhile, you can automatically archive it using a cronjob.
Stars: ✭ 97 (-13.39%)
Mutual labels:  slack
Graylog Plugin Slack
Graylog alarm callback for Slack
Stars: ✭ 110 (-1.79%)
Mutual labels:  slack
Botonomous
A PHP Framework For Creating Autonomous Slack Bots
Stars: ✭ 109 (-2.68%)
Mutual labels:  slack
Tight
A browser extension that simplifies the Slack interface, making it easier to focus.
Stars: ✭ 101 (-9.82%)
Mutual labels:  slack

TeamCity Slack plugin

Build Status

This plugin allows you to integrate your CI with Slack.

The main feature is that you can specify not exact branch name but the regexp branch mask.

For example, if you have separate build configurations for feature branches and common branches, then it is easy to setup notifications into corresponding Slack channels.

The second big thing is that you can compose your own messages using template placeholders and Slack formatting.

And you can easily send notifications without running the build with the Try it feature.

The plugin automatically backs up its settings after each modification.

Successful build Failed build Artifact links

Table of Contents

  1. Install plugin
  2. Build configuration
  3. Message placeholders
  4. Artifact links
  5. Message preview
  6. Troubleshooting

Install plugin

Download from releases or compile sources with mvn package.

Next upload target/slackIntegration.zip to TeamCity data/plugins/ folder (restart is needed).

Create Slack App:

  • Open Create app form and fill it
  • Go to OAuth & Permissions. Add following scopes in Scopes section: channels:read, chat:write, chat:write.public, im:write, users:read, users:read.email. If you plan to change sender name, add also chat:write.customize scope.
  • Click Install App in Workspace
  • Now copy Bot User OAuth Token.

Paste this token into Administration -> Slack -> OAuth Access Token field.

Plugin setup

That's it! Now you can open any build configuration home and choose Slack tab.

By default personal notifications (private notifications) are disabled. Personal notifications notify only about failed builds.

Slack tab in classic UI: Slack tab

Slack tab in experimental UI: Slack tab Only admins and projects admins have rights to access these settings.

Build configuration

Sample configuration:

Edit settings

Notifications for branches captured by regular expression will be sent to slack channel or/and private chat. Message will be compiled according to template.

Note: Please avoid using heading # in channel name.

The Only trigger when build changes option allows you to be notified when the previous build status changes from failure to success, or vice versa. The previous build is the latest build on the same branch as the current build (or not if the current build has no branch), and its status is determined (failure or success) and it's not a personal build.

The build settings number is not limited, so you can set up notifications for feature branches in one channel, and for release branches in another one.

Message placeholders

{name}

Full name of the build configuration, has the format "project_name :: buildconfig_name".

{number}

User defined build number.

{branch}

Branch display name, i.e. name to show to the user. Unknown if not applicable.

Please make sure that your VCS settings are correct!

See TeamCity Docs and #21

{status}

succeeded if build is successful, started if started, canceled if canceled, failed otherwise.

{link}

URL to view results page.

{mentions}

Slack users mentions only if build fails. Unknown users will be skipped.

{users}

TeamCity user name list only if build fails. Unknown users will be skipped.

{changes}

Concatenated description of head 5 changes from build with author name (from VCS) in square braces, e.g. My awesome feature [John Smith].

{reason}

Build problems that caused build failure when build is failed. Unknown if cannot detect.

{artifactLinks}

See Artifact links.

{allArtifactsDownloadUrl}

Link to download all artifacts as zip archive.

{artifactsRelUrl}

Artifacts relative path. It is necessary if you want to construct artifact link manually.

{formattedDuration}

Build duration in TeamCity format.

Parameters placeholders

You can also use project and build parameters, e.g. {%my.awesome.teamcity.param%}

Artifact links

In case you want to access build artifacts with third party web server (e.g. nginx) you can use this feature. Specify Public artifacts URL as root path served by your web server. And Artifacts mask in Build configuration. All other will be done automatically.

Sample nginx configuration:

location /art/ {
    alias <teamcity-data-dir>/system/artifacts/;
    autoindex on;
}

Message preview

By default Slack plugin sends messages as attachments. But there is one inconvenience — there is no message preview in push notifications. It can be easily fixed by turning off the Send message as attachment checkbox in Plugin setup.

Now Slack messages look like

Successful build with emoji

The message is prepended by Emoji ✅, ⛔ or ⚪ for successful, failed and other build statuses respectively.

Troubleshooting

Q: I checked the option to send private messages and added the {mention} placeholder to the message, but neither the message was send to the slack user nor the name was mentioned in the slack message!

A: This plugin identifies the slack user by the email address of the committing user in the code repository. This requires that both accounts use the same email address.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].