Keith-Puzey-CA

How to Incorporate Slack Alerts into Your CA Release Automation deployments

Blog Post created by Keith-Puzey-CA Employee on Mar 24, 2017

   Most development teams today are using instance messaging tools like Slack, HipChat or Lync to collaborate. These tools are also used to send automated alerts to the development teams and to keep the teams up to date with build progression. For example, when nightly builds run and any issues generated from these build cycles. Tools like Slack are more convenient than emails because people can respond to the messages and easily discuss the build progress.

 

    In this blog post I will show you what you need to do to get Slack notifications and alerts when you’re developing and testing. Then I will show you how these notifications can be incorporated into a CA Release Automation Deployment

 

          

  • Choose the channel you want to get notifications to and click on ‘Add Incoming Webhooks integration’.

          Slack WebHook

 

  • Copy the Webhook URL you receive:

         Slack WebHook URL

 

  • You can customize the image and the name that you will receive notifications from:       Slack Customisation

 

  • This is an example of a message that will be sent to the Slack channel

        

         Sample Slack Message

  • Click Save Settings

 

  • Now we will incorporate the Slack Notifications into your CA Release Automation Processes
  • First you need to create an action using the standard REST action:      
  • URI                  -       Enter  the URL of the web hook for the slack channel you want to send the message
  • Rest Verb         -       POST
  • Http Headers   -       content-type : application/json
  • Body                 -       Contains the JSON of the message being sent in the format below.

                           {"text":"Text to be sent to Slack."}.

 

  • This is an example of a message being sent to Slack including some Release and Environment Parameters and the corresponding messages in Slack and the corresponding message in Slack

 

 

   I would be interested in your thoughts on this type of integration and any integrations that you may have created.

 

 

Enjoy  

 

Keith

 

 

Outcomes