<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Muhammad Abdurrahman]]></title><description><![CDATA[Helping team to build a reliable system]]></description><link>https://blog.hereabran.dev</link><generator>RSS for Node</generator><lastBuildDate>Sat, 13 Jun 2026 11:46:37 GMT</lastBuildDate><atom:link href="https://blog.hereabran.dev/rss.xml" rel="self" type="application/rss+xml"/><language><![CDATA[en]]></language><ttl>60</ttl><item><title><![CDATA[Kubernetes Toos]]></title><description><![CDATA[Cluster management:

Lens
KubeSphrere

AddOn:

Monokle
Kubecost
Kubeshop
DevSpace

Monitoring:

Checkly

Security:

Teleport]]></description><link>https://blog.hereabran.dev/kubernetes-toos</link><guid isPermaLink="true">https://blog.hereabran.dev/kubernetes-toos</guid><dc:creator><![CDATA[Muhammad Abdurrahman]]></dc:creator><pubDate>Sun, 01 May 2022 08:58:07 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/unsplash/cckf4TsHAuw/upload/v1651395596931/H9bA896N-.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>Cluster management:</p>
<ol>
<li>Lens</li>
<li>KubeSphrere</li>
</ol>
<p>AddOn:</p>
<ol>
<li>Monokle</li>
<li>Kubecost</li>
<li>Kubeshop</li>
<li><a target="_blank" href="https://devspace.sh/">DevSpace</a></li>
</ol>
<p>Monitoring:</p>
<ol>
<li>Checkly</li>
</ol>
<p>Security:</p>
<ol>
<li>Teleport</li>
</ol>
]]></content:encoded></item><item><title><![CDATA[SonarMatt; Application to Forward SonarQube’s Webhooks to Mattermost or Slack]]></title><description><![CDATA[SonarQube is an open-source platform to do continuous inspection on code for automatic review. Based on the need for notifications to see the SonarQube results in realtime after scanning, and because SonarQube does not have a special webhook format f...]]></description><link>https://blog.hereabran.dev/sonarmatt-application-to-forward-sonarqubes-webhooks-to-mattermost-or-slack</link><guid isPermaLink="true">https://blog.hereabran.dev/sonarmatt-application-to-forward-sonarqubes-webhooks-to-mattermost-or-slack</guid><dc:creator><![CDATA[Muhammad Abdurrahman]]></dc:creator><pubDate>Sun, 01 May 2022 08:37:16 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1661780671014/z93k4oTBt.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>SonarQube is an open-source platform to do continuous inspection on code for automatic review. Based on the need for notifications to see the SonarQube results in realtime after scanning, and because SonarQube does not have a special webhook format for Slack, I made a simple application to forward SonarQube’s webhook to GITS Indonesia chat based on Mattermost. I called this application as “SonarMatt”.</p>
<p>This application is made with node.js and express.js. It listens to completed scan event from SonarQube and accepts its request. The requests that are received from SonarQube will be filtered according to the format needed by Mattermost’s or Slack’s incoming webhook. In this, data object in the form of JSON is forwarded by making a post request to the endpoint of the Mattermost’s incoming webhook URL.</p>
<p>I am going to explain how to edit the application from the source code and how to use it.</p>
<h3 id="heading-how-to-develop-or-edit-the-application-from-source-code">How to Develop or Edit the Application from Source Code</h3>
<p>So, these are the steps to develop or edit the application from source code.</p>
<ul>
<li>Clone the repository</li>
</ul>
<pre><code>git <span class="hljs-keyword">clone</span> https:<span class="hljs-comment">//git.gits.id/devops/sonarmatt.git</span>
</code></pre><ul>
<li>Install requirement dependencies</li>
</ul>
<pre><code><span class="hljs-built_in">cd</span> sonarmatt &amp; npm install
</code></pre><p>Default webhook payload from SonarQube after a completed task is like this:</p>
<pre><code>{
    <span class="hljs-attr">"serverUrl"</span>: <span class="hljs-string">"http://localhost:9000"</span>,
    <span class="hljs-attr">"taskId"</span>: <span class="hljs-string">"AVh21JS2JepAEhwQ-b3u"</span>,
    <span class="hljs-attr">"status"</span>: <span class="hljs-string">"SUCCESS"</span>,
    <span class="hljs-attr">"analysedAt"</span>: <span class="hljs-string">"2016-11-18T10:46:28+0100"</span>,
    <span class="hljs-attr">"revision"</span>: <span class="hljs-string">"c739069ec7105e01303e8b3065a81141aad9f129"</span>,
    <span class="hljs-attr">"project"</span>: {
        <span class="hljs-attr">"key"</span>: <span class="hljs-string">"myproject"</span>,
        <span class="hljs-attr">"name"</span>: <span class="hljs-string">"My Project"</span>,
        <span class="hljs-attr">"url"</span>: <span class="hljs-string">"https://mycompany.com/sonarqube/dashboard?id=myproject"</span>
    },
    <span class="hljs-attr">"properties"</span>: {
    },
    <span class="hljs-attr">"qualityGate"</span>: {
        <span class="hljs-attr">"conditions"</span>: [
            {
                <span class="hljs-attr">"errorThreshold"</span>: <span class="hljs-string">"1"</span>,
                <span class="hljs-attr">"metric"</span>: <span class="hljs-string">"new_security_rating"</span>,
                <span class="hljs-attr">"onLeakPeriod"</span>: <span class="hljs-literal">true</span>,
                <span class="hljs-attr">"operator"</span>: <span class="hljs-string">"GREATER_THAN"</span>,
                <span class="hljs-attr">"status"</span>: <span class="hljs-string">"OK"</span>,
                <span class="hljs-attr">"value"</span>: <span class="hljs-string">"1"</span>
            },
            {
                <span class="hljs-attr">"errorThreshold"</span>: <span class="hljs-string">"1"</span>,
                <span class="hljs-attr">"metric"</span>: <span class="hljs-string">"new_reliability_rating"</span>,
                <span class="hljs-attr">"onLeakPeriod"</span>: <span class="hljs-literal">true</span>,
                <span class="hljs-attr">"operator"</span>: <span class="hljs-string">"GREATER_THAN"</span>,
                <span class="hljs-attr">"status"</span>: <span class="hljs-string">"OK"</span>,
                <span class="hljs-attr">"value"</span>: <span class="hljs-string">"1"</span>
            },
            {
                <span class="hljs-attr">"errorThreshold"</span>: <span class="hljs-string">"1"</span>,
                <span class="hljs-attr">"metric"</span>: <span class="hljs-string">"new_maintainability_rating"</span>,
                <span class="hljs-attr">"onLeakPeriod"</span>: <span class="hljs-literal">true</span>,
                <span class="hljs-attr">"operator"</span>: <span class="hljs-string">"GREATER_THAN"</span>,
                <span class="hljs-attr">"status"</span>: <span class="hljs-string">"OK"</span>,
                <span class="hljs-attr">"value"</span>: <span class="hljs-string">"1"</span>
            },
            {
                <span class="hljs-attr">"errorThreshold"</span>: <span class="hljs-string">"80"</span>,
                <span class="hljs-attr">"metric"</span>: <span class="hljs-string">"new_coverage"</span>,
                <span class="hljs-attr">"onLeakPeriod"</span>: <span class="hljs-literal">true</span>,
                <span class="hljs-attr">"operator"</span>: <span class="hljs-string">"LESS_THAN"</span>,
                <span class="hljs-attr">"status"</span>: <span class="hljs-string">"NO_VALUE"</span>
            }
        ],
        <span class="hljs-attr">"name"</span>: <span class="hljs-string">"SonarQube way"</span>,
        <span class="hljs-attr">"status"</span>: <span class="hljs-string">"OK"</span>
    }
}
</code></pre><p>Supported Payload for Mattermost’s incoming webhook:</p>
<pre><code>{
  <span class="hljs-attr">"channel"</span>: <span class="hljs-string">"town-square"</span>,
  <span class="hljs-attr">"username"</span>: <span class="hljs-string">"test-automation"</span>,
  <span class="hljs-attr">"icon_url"</span>: <span class="hljs-string">"https://custom-icon-url.png"</span>,
  <span class="hljs-attr">"text"</span>: <span class="hljs-string">"text message here"</span>
}
</code></pre><ul>
<li><p>filter the payload within SonarMatt
<img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1661780947351/Lb4LtH8WZ.png" alt="1*NSPJQixFFvquJHv08rlDPg.png" /> </p>
<blockquote>
<p><em>Custom Your Message</em></p>
</blockquote>
</li>
<li><p>Make post request within payload above
<img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1661781206022/43fToVhQa.png" alt="1*OTv8z6U6Jgn4Yuj1ke3Kjw.png" /></p>
<blockquote>
<p><em>Post Request to Mattermost Incoming Webhook Using Token URL</em></p>
</blockquote>
</li>
</ul>
<p><strong>The result will be like this:</strong>
<img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1661781222662/lDM5W9wXR.png" alt="1*NuMa72VJb1RxctxbEySQ8g.png" /></p>
<blockquote>
<p><em>Received Message After Has Completed Sonar Scan</em></p>
</blockquote>
<h3 id="heading-how-to-use-sonarmatt">How to Use SonarMatt</h3>
<pre><code>Go to your SonarQube Project <span class="hljs-operator">&gt;</span> Administration <span class="hljs-operator">&gt;</span> Webhooks <span class="hljs-operator">&gt;</span> Create
</code></pre><p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1661781308240/IQt8I1F0Y.png" alt="1*NTSoN7cY4N2QJQEYK78M8Q.png" /></p>
<blockquote>
<p><em>Forwarding SonarQube Webhook to Mattermost Using SonarMatt Application</em></p>
</blockquote>
<p>Yes, that’s it!</p>
<p>Best regards and thank you!</p>
]]></content:encoded></item></channel></rss>