As part our ChatOps configuration at work I am playing around with configuring different apps into our slack channel. In this post i will show you how to connect Octopus Deploy into Slack for notifications.

Solution:

Slack Settings:

From the channel you wish to send your notifications to press the Channel Settings button  (cog on the top right of the window) and select “Add an app or integration”

octslack04

Select Build (Again top right)

octslack04

Select “Make a Custom Integration”

octslack05

Select “Incoming WebHooks”

octslack06

Select the Channel to post to and Press “Add Incoming WebHooks Integration”

octslack07

Scroll down to the Integration Settings section and Enter details for Customise Name, Descriptive Label and most importantly COPY THE WEBHOOK URL

octslack08

We are now set up on the Slack side, we just need to configure Octopus Deploy.

Octopus Deploy Settings:

First download the ready made Template from the Octopus Deploy website: Slack – Notify Deployment and press the copy to Clipboard button

octslack00

Now open the Octopus Deploy web page and naviagate to Library -> Step Templates and Select Import (top right of the page)

octslack01

Paste in the text from the link above and press Import

octslack03

You are now ready to use the template in your deployment process.

Select a project and open its Process and press “Add step”

octslack09

 

Scroll down the list of possible steps and select “Slack – Notify Deployment”

octslack10

Now we simply fill in the details of the template. The Webhook URL is the web string you copied from the Slack configuration, (I re-enter the channel to confirm) and click Save.

octslack11

 

Result

Now when you run the deployment you should see the below in your slack channel!

octslack02

Advertisements