Skip to content

Latest commit

 

History

History
46 lines (33 loc) · 1.54 KB

set-up-slack-notifications.md

File metadata and controls

46 lines (33 loc) · 1.54 KB

Setting up Notifications to Slack

Spinnaker supports notifications to Slack (and other places) on these six events:

  • Pipeline start
  • Pipeline completion
  • Pipeline failure
  • Stage start
  • Stage completion
  • Stage failure

Create a Slack bot user (and get the Slack auth token)

  1. Go to your Slack management page, and navigate to "Configure Apps" (or go to https://your-slack-workspace.slack.com/apps/manage)
  2. Click on "Custom Integrations"
  3. Click on "Bots"
  4. Click on "Add to Slack"
  5. Give your Slack bot a username (such as spinnakerbot)
  6. Click "Add bot integration"
  7. Copy the "API Token". Optionally, customize other settings on the Bot configuration.
  8. Click "Save Integration"

Add the Slack bot user to Spinnaker

  1. SSH into your Minnaker instance

  2. Run this command (replace spinnakerbot with your Slack bot's username) to add the Slack notification configuration.

    hal config notification slack edit --bot-name spinnakerbot --token
  3. Run this command to enable the Slack notification

    ``bash hal config notification slack enable

    
    
  4. Run this command to apply your changes

    hal deploy apply

Use the Slack notification

In order to notify into a given Slack channel, the Slack bot should be invited into your Slack channel(s). Then, in a pipeline configuration, on the 'configuration' page, you can configure notifications to those channels for when your pipeline starts, completes, or fails, and you can additionally configure the same notifications on individual stages.