<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Vic Iglesias</title>
    <description>The latest articles on DEV Community by Vic Iglesias (@vicnastea).</description>
    <link>https://dev.to/vicnastea</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F125540%2Fdff2df23-dcb4-4c6b-85c1-62c1ba88155f.jpg</url>
      <title>DEV Community: Vic Iglesias</title>
      <link>https://dev.to/vicnastea</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/vicnastea"/>
    <language>en</language>
    <item>
      <title>Spinnaker Notifications in Google Hangouts Chat</title>
      <dc:creator>Vic Iglesias</dc:creator>
      <pubDate>Thu, 10 Jan 2019 22:54:57 +0000</pubDate>
      <link>https://dev.to/vicnastea/spinnaker-notifications-in-google-hangouts-chat-5bg8</link>
      <guid>https://dev.to/vicnastea/spinnaker-notifications-in-google-hangouts-chat-5bg8</guid>
      <description>

&lt;p&gt;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 &lt;a href="https://gsuite.google.com/products/chat/"&gt;Google Hangouts Chat&lt;/a&gt; as an option since it is my primary chat for working hours. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--avyQOGx2--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/otf9zpa2dh1lwcf1c1b8.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--avyQOGx2--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/otf9zpa2dh1lwcf1c1b8.png" alt="HangoutsChat drop down"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;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.&lt;/p&gt;

&lt;p&gt;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 &lt;a href="https://github.com/spinnaker/echo"&gt;echo&lt;/a&gt;, the Spinnaker component in charge of notifications, I stumbled on &lt;a href="https://github.com/spinnaker/echo/blob/0c19f490bb10ea235e4e557340a1640c18e2cffa/echo-notifications/src/main/groovy/com/netflix/spinnaker/echo/config/GoogleChatConfig.groovy#L34"&gt;a property&lt;/a&gt; that needed to be set. I went about finding where that property could be configured. &lt;/p&gt;

&lt;p&gt;My Spinnaker install was setup by &lt;a href="https://www.spinnaker.io/reference/halyard/"&gt;Halyard&lt;/a&gt;, 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.&lt;/p&gt;

&lt;p&gt;I went over to the &lt;a href="https://www.spinnaker.io/reference/halyard/custom/#custom-service-settings"&gt;Custom Configuration docs&lt;/a&gt; to remind myself where I need to add my changes. I then created my &lt;code&gt;echo-local.yaml&lt;/code&gt; file with the following:&lt;/p&gt;



&lt;div class="highlight"&gt;&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="na"&gt;googlechat&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;enabled&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="no"&gt;true&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;After a &lt;code&gt;hal deploy apply&lt;/code&gt; 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.&lt;/p&gt;

&lt;p&gt;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:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--485ixCc_--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/2tx9zw7cqwro763qbzi1.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--485ixCc_--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/2tx9zw7cqwro763qbzi1.png" alt="GoogleChat settings"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;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":&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--xi0NL7Ox--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/lnlz7y5sg4sur5etdvwp.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--xi0NL7Ox--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/lnlz7y5sg4sur5etdvwp.png" alt="configure webhooks drop down"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;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:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--VIfELeR7--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/4p3mcxhramxw3524yxvl.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--VIfELeR7--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/4p3mcxhramxw3524yxvl.png" alt="spinnaker notification"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Next up, submitting a PR to the Spinnaker docs.&lt;/p&gt;


</description>
      <category>spinnaker</category>
      <category>cicd</category>
      <category>hangouts</category>
      <category>chat</category>
    </item>
  </channel>
</rss>
