<?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: Doug Parsons</title>
    <description>The latest articles on DEV Community by Doug Parsons (@dcparsons).</description>
    <link>https://dev.to/dcparsons</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%2F465375%2F681e481f-ef6d-45d8-8d5f-a0c82e29ed77.jpeg</url>
      <title>DEV Community: Doug Parsons</title>
      <link>https://dev.to/dcparsons</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/dcparsons"/>
    <language>en</language>
    <item>
      <title>Noisy Build</title>
      <dc:creator>Doug Parsons</dc:creator>
      <pubDate>Mon, 14 Sep 2020 20:42:39 +0000</pubDate>
      <link>https://dev.to/dcparsons/noisy-build-587h</link>
      <guid>https://dev.to/dcparsons/noisy-build-587h</guid>
      <description>&lt;h3&gt;
  
  
  UPDATE:
&lt;/h3&gt;

&lt;p&gt;Congrats to all the &lt;a href="https://dev.to/devteam/github-actions-hackathon-winners-announced-38o2"&gt;winners of the Hackathon&lt;/a&gt; and thank you to the staff of dev.to for selecting my entry as a runner up!  Looking forward to more events. &lt;/p&gt;

&lt;h3&gt;
  
  
  Noisy Build workflow
&lt;/h3&gt;

&lt;p&gt;There are three main pieces to my entry:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Microsoft Azure IoT Hub - C2D Action - an action that publishes a message to an Azure IoT Hub&lt;/li&gt;
&lt;li&gt;An MXCHIP IoT DevKit&lt;/li&gt;
&lt;li&gt;A repository that contains a reference to the above action, the CI Workflow, and the C++ project that is running on the MXCHIP.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Submission Category: Interesting IoT (secondary would be Wacky Wildcards I suppose)
&lt;/h3&gt;

&lt;h3&gt;
  
  
  Yaml File or Link to Code
&lt;/h3&gt;


&lt;div class="ltag-github-readme-tag"&gt;
  &lt;div class="readme-overview"&gt;
    &lt;h2&gt;
      &lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--vJ70wriM--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://practicaldev-herokuapp-com.freetls.fastly.net/assets/github-logo-ba8488d21cd8ee1fee097b8410db9deaa41d0ca30b004c0c63de0a479114156f.svg" alt="GitHub logo"&gt;
      &lt;a href="https://github.com/dcparsons"&gt;
        dcparsons
      &lt;/a&gt; / &lt;a href="https://github.com/dcparsons/azure-iot-action"&gt;
        azure-iot-action
      &lt;/a&gt;
    &lt;/h2&gt;
    &lt;h3&gt;
      
    &lt;/h3&gt;
  &lt;/div&gt;
  &lt;div class="ltag-github-body"&gt;
    
&lt;div id="readme" class="md"&gt;
&lt;h1&gt;
Microsoft Azure IoT Hub - C2D Action&lt;/h1&gt;
&lt;p&gt;This action allows you to send a Cloud-to-Device message as part of your Github Actions CI/CD workflow.&lt;/p&gt;
&lt;h1&gt;
Basic Usage&lt;/h1&gt;
&lt;pre&gt;&lt;code&gt;- name: Publish Action C2D Message
  uses: dcparsons/azure-iot-action@v1.0.2
  with
    iot-hub-connection-string: &amp;lt;iot hub connection string&amp;amp;gt
    device-id: &amp;lt;device id&amp;amp;gt
    message: &amp;lt;message&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;h2&gt;
Parameters&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;iot-hub-connection-string&lt;/strong&gt; - this should be the connection string to the IOT Hub that you setup in Microsoft Azure.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;device-id&lt;/strong&gt; - the id of the device you want to send a message to&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;message&lt;/strong&gt; - the message you want to send to the device&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;
Leveraging Secrets&lt;/h3&gt;
&lt;p&gt;Your IoT connection string is going to contain a shared access key which will grant anyone with the connection string access to your IoT Hub.  If you are going to use this action in your CI/CD workflow I would highly suggest using &lt;a href="https://docs.github.com/en/actions/configuring-and-managing-workflows/creating-and-storing-encrypted-secrets"&gt;GitHub Secrets&lt;/a&gt; to store that data.  You can also choose to add your device-id as a secret…&lt;/p&gt;
&lt;/div&gt;
  &lt;/div&gt;
  &lt;div class="gh-btn-container"&gt;&lt;a class="gh-btn" href="https://github.com/dcparsons/azure-iot-action"&gt;View on GitHub&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;



&lt;div class="ltag-github-readme-tag"&gt;
  &lt;div class="readme-overview"&gt;
    &lt;h2&gt;
      &lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--vJ70wriM--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://practicaldev-herokuapp-com.freetls.fastly.net/assets/github-logo-ba8488d21cd8ee1fee097b8410db9deaa41d0ca30b004c0c63de0a479114156f.svg" alt="GitHub logo"&gt;
      &lt;a href="https://github.com/dcparsons"&gt;
        dcparsons
      &lt;/a&gt; / &lt;a href="https://github.com/dcparsons/actions-hackathon"&gt;
        actions-hackathon
      &lt;/a&gt;
    &lt;/h2&gt;
    &lt;h3&gt;
      actions-hackathon
    &lt;/h3&gt;
  &lt;/div&gt;
  &lt;div class="ltag-github-body"&gt;
    
&lt;div id="readme" class="md"&gt;
&lt;h1&gt;
2020 DEV.TO GitHub Actions Hackathon&lt;/h1&gt;
&lt;p&gt;This is my submission for the &lt;a href="https://dev.to/devteam/announcing-the-github-actions-hackathon-on-dev-3ljn" rel="nofollow"&gt;DEV.TO GitHub Actions Hackathon&lt;/a&gt; that I have named "Noisy Build".  I entered this into the IoT category of the hackathon.&lt;/p&gt;
&lt;h1&gt;
Summary&lt;/h1&gt;
&lt;p&gt;The premise of my entry is pretty simple: after a CI build completes, send a message to an Azure IoT Hub. That message is then relayed to a specific device (an &lt;a href="https://docs.microsoft.com/en-us/samples/azure-samples/mxchip-iot-devkit-get-started/sample/" rel="nofollow"&gt;MXChip IoT DevKit&lt;/a&gt; in my case) that interprets the message and plays a sound based on whether or not the build succeeded or failed.&lt;/p&gt;
&lt;p&gt;The three main components of my entry follow.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;/src/web-app&lt;/strong&gt; - this is a vanilla dotnet API that was generated using &lt;code&gt;dotnet new webapi&lt;/code&gt;. This is the code that the workflow will build and it is the result of this build that is sent to the IoT Hub.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;/src/iot-app&lt;/strong&gt; - this is an Ardunio C++ project that has been loaded onto the MXChip…&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
  &lt;/div&gt;
  &lt;div class="gh-btn-container"&gt;&lt;a class="gh-btn" href="https://github.com/dcparsons/actions-hackathon"&gt;View on GitHub&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;


&lt;h3&gt;
  
  
  Additional Resources / Info
&lt;/h3&gt;

&lt;p&gt;Here is a video that demonstrates the entire workflow. &lt;br&gt;
&lt;iframe width="710" height="399" src="https://www.youtube.com/embed/LHh5tAEH-HM"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

</description>
      <category>actionshackathon</category>
    </item>
  </channel>
</rss>
