A couple of weeks ago I started building out some Spinnaker pipelines that I wanted to make sure caught my attention if they failed for some reason. When looking at the Spinnaker drop down for possible notifications I was pleasantly surprised to see Google Hangouts Chat as an option since it is my primary chat for working hours.
While I was already able to do email notifications, I was interested in getting notifications into Google Hangouts Chat so that I could send them to one of our rooms rather than a mailing list or an individual.
Next, I tried to figure out what I would need to configure for these notifications to get fired off. I looked into the Spinnaker docs but didn't find anything related to this integration. Upon perusing the code of echo, the Spinnaker component in charge of notifications, I stumbled on a property that needed to be set. I went about finding where that property could be configured.
My Spinnaker install was setup by Halyard, the de-facto tool for managing Spinnaker installations. Unfortunately, Halyard did not yet have the command I needed to enable the Google Hangouts Chat integration so I had to dive into the config files to edit them manually.
I went over to the Custom Configuration docs to remind myself where I need to add my changes. I then created my
echo-local.yaml file with the following:
googlechat: enabled: true
hal deploy apply to update my installation with that change, Chat was enabled but not yet fully configured. I needed to tell Spinnaker when and where to send its notifications.
I went over to my favorite pipeline to find out what I would need to configure for it to send notifications to a particular Chat room. I was presented with the following settings:
The only thing I needed to provide was the link to my "Chat Webhook URL". To find this I needed to go to the room that I had created and then click on "Configure webhooks":
I was then able to create a new webhook with and then copy my Webhook URL into the Spinnaker notification dialog. Once it was all configured I started receiving my notifications that looked like this:
Next up, submitting a PR to the Spinnaker docs.