<?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[athreyapatel]]></title><description><![CDATA[Technical Blogs on DevOps and Engineering]]></description><link>https://athreya.tech</link><image><url>https://cdn.hashnode.com/res/hashnode/image/upload/v1731005138202/9327bb0a-86c9-49bd-b057-e7d0bb9fd43b.png</url><title>athreyapatel</title><link>https://athreya.tech</link></image><generator>RSS for Node</generator><lastBuildDate>Thu, 09 Apr 2026 09:57:49 GMT</lastBuildDate><atom:link href="https://athreya.tech/rss.xml" rel="self" type="application/rss+xml"/><language><![CDATA[en]]></language><ttl>60</ttl><item><title><![CDATA[Jenkins Tweaks for Beginners - Part 2]]></title><description><![CDATA[Jenkins is an open source automation tool which made CI and CD super easier to implement. But for beginners, it would take loads of time to come up with a solution for a feature. It has limitations, but comes with a wide range of plugins which would ...]]></description><link>https://athreya.tech/jenkins-tweaks-for-beginners-part-2</link><guid isPermaLink="true">https://athreya.tech/jenkins-tweaks-for-beginners-part-2</guid><category><![CDATA[Jenkins]]></category><category><![CDATA[Continuous Integration]]></category><category><![CDATA[continuous deployment]]></category><category><![CDATA[Cloud]]></category><category><![CDATA[GCP]]></category><dc:creator><![CDATA[Athreya Patel]]></dc:creator><pubDate>Sat, 02 May 2020 16:08:24 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1588435678331/5ulfBMkTk.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p><strong>Jenkins </strong>is an open source automation tool which made CI and CD super easier to implement. But for beginners, it would take loads of time to come up with a solution for a feature. It has limitations, but comes with a wide range of plugins which would add lots of features.</p>
<p> <a target='_blank' rel='noopener noreferrer'  href="https://blog.athreyapatel.codes/awesome-features-in-jenkins-which-makes-it-interesting-for-beginners-part-1-3b4a1440e7b1">Here </a> is my Part 1 which explains on some UI tweaks which can be added to Jenkins.</p>
<h2 id="prerequisites">Prerequisites</h2>
<p>As we are discussing about tweaks, All you need is:</p>
<ul>
<li>Basic Understanding on how to write pipelines in Jenkins.</li>
<li>Basic Linux and Java skills to understand the working. </li>
<li>Groovy for scripting</li>
</ul>
<h2 id="setting-up-pipelines-">Setting up pipelines:</h2>
<p>In Jenkins pipeline can be defined in two types of syntax</p>
<ol>
<li>Declarative</li>
<li>Scripted</li>
</ol>
<p><strong>Declarative </strong>approach helps us to to write and read Pipeline code easier. It provides support for various technologies like Docker and Kubernetes. I will be using this approach.</p>
<pre><code>pipeline {
    agent any 
    stages {
        stage(<span class="hljs-string">'First Stage'</span>) {
            steps {
                <span class="hljs-built_in">echo</span> <span class="hljs-string">'Hello world!'</span> 
            }
        }
        stage(<span class="hljs-string">'Second Stage'</span>) {
            steps {
                <span class="hljs-built_in">echo</span> <span class="hljs-string">'Hello Hello world!'</span> 
            }
        }
    }
}
</code></pre><p><strong>Scripted </strong>approach was the first implementation of Pipeline as Code and is imperative programming approach.</p>
<pre><code>node {  
    stage(<span class="hljs-string">'First Stage'</span><span class="hljs-string">') { 
        echo '</span>Hello world!<span class="hljs-string">' 
    }
    stage('</span>Test<span class="hljs-string">') { 
        echo '</span>Hello Hello world!<span class="hljs-string">'
    }
}</span>
</code></pre><h2 id="script-console">Script Console</h2>
<p>The script console in Jenkins provides an environment to try out scripts which can be used in Jenkins without Script approval. 
<code>Don&#39;t ever reload the page without copying the script  😆</code> </p>
<p>You can find the script console by navigating to </p>
<pre><code>YOUR_IP:PORT/script
</code></pre><p>for example:</p>
<pre><code>107.235.18.170:8080/script
</code></pre><p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1588431551508/-Py06R2gK.png" alt="Script Console"></p>
<h2 id="adding-parameters-to-pipeline-">Adding Parameters to Pipeline:</h2>
<p>Parameters in Jenkins can be used to define environment variables which can be accessed in the pipeline for performing certain tasks.</p>
<blockquote>
<p>Go to your project &gt; Configure &gt; Checkbox &quot;This project is parameterised&quot;</p>
</blockquote>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1588432152364/y33MblDI9.png" alt="Adding Parameters"></p>
<h2 id="snippet-generator">Snippet Generator</h2>
<p>Snippet Generator will generate pipeline script which can be used inside the pipeline. It generates scripts for installed plugins. I have already explained in my last blog on how plugins can add features to Jenkins.</p>
<blockquote>
<p>Go to your Project &gt; Select Pipeline Syntax from the LeftPane &gt; Snippet Generator</p>
</blockquote>
<h4 id="generate-scripts-for-declarative-syntax">Generate Scripts for Declarative Syntax</h4>
<blockquote>
<p>Go to your Project &gt; Select Pipeline Syntax from the LeftPane &gt; Declarative Directive Generator</p>
</blockquote>
<h2 id="conclusion">Conclusion</h2>
<p>Lets conclude the above learnt steps from an example</p>
<h3 id="install-extended-choice-parameter">Install Extended Choice Parameter</h3>
<p>Manage Jenkins &gt; Manage Plugins &gt; Search for &quot; <a target='_blank' rel='noopener noreferrer'  href="https://plugins.jenkins.io/extended-choice-parameter/">Extended Choice Parameter</a> &quot; &gt; Install without restart</p>
<p>Extended Choice Parameter is similar to Choice Parameter where user is provided with choice, but extended choice provides enhanced features by providing a way to use Groovy Script which can be used to return array of values.</p>
<h4 id="create-a-pipeline">Create a pipeline</h4>
<blockquote>
<p>New Item &gt; Select <code>Pipeline</code> &gt; Enter an item name &gt; OK</p>
</blockquote>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1588433592890/0EIa2Xx6u.png" alt="Creating a Pipeline"></p>
<p>Lets copy the pipeline script provided at top in declarative approach to <code>Pipeline script</code></p>
<h4 id="generating-extended-choice-parameter-from-declarative-generator">Generating extended choice parameter from Declarative Generator</h4>
<p>In the Declarative Generator &gt;  From the dropdown select <code>parameters: Parameters</code> &gt; Add &gt; extendedChoice: Extended Choice Parameter</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1588434238489/vGU6-iaTn.png" alt="Extended Choice Parameter"></p>
<h4 id="verify-the-working-of-script-in-script-console">Verify the working of script in Script Console</h4>
<p>In another tab, verify the working of the script
<img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1588434345737/WbfCSf37a.png" alt="Script Console"></p>
<blockquote>
<p>Generate Declarative Directive from Declarative Generator and Copy</p>
</blockquote>
<p>Here is the final pipeline which I can use in the Pipeline Script of the project.</p>
<pre><code>pipeline {
    agent any 
    parameters {
      extendedChoice bindings: <span class="hljs-string">''</span>, description: <span class="hljs-string">'this is for the demo example'</span>, groovyClasspath: <span class="hljs-string">''</span>, 
        groovyScript: <span class="hljs-string">'''def example = "1"

      if(example == "1") {
           return ["1st","2nd","3rd"]
      }'''</span>, multiSelectDelimiter: <span class="hljs-string">','</span>, name: <span class="hljs-string">'example'</span>, quoteValue: false, saveJSONParameterToFile: false, type: <span class="hljs-string">'PT_SINGLE_SELECT'</span>, visibleItemCount: <span class="hljs-number">4</span>
    }

    stages {
        stage(<span class="hljs-string">'First Stage'</span>) {
            steps {
                echo <span class="hljs-string">'Hello world!'</span> 
            }
        }
        stage(<span class="hljs-string">'Second Stage'</span>) {
            steps {
                echo <span class="hljs-string">'Hello Hello world!'</span> 
            }
        }
    }
}
</code></pre><p>Now build the Project using Build Now</p>
<p>After the first build, the <code>Build with Parameters</code>  replaces <code>Build Now</code>
Click on <strong>Build with Parameters</strong> to Select to select the parameter and <strong>Build</strong></p>
<p>These tweaks can make Jenkins awesome for CICD pipelines and is loved by many ❤️. </p>
<p>Thanks!!</p>
]]></content:encoded></item><item><title><![CDATA[Awesome Features in Jenkins which makes it interesting for beginners — Part 1]]></title><description><![CDATA[Now, your team wants a automated solution for Continuous Integration and Continuous Deployment. You find Jenkins is one of the most popular tool and start with it.
Eventually you find Jenkins boring with the same interface and user experience. Follow...]]></description><link>https://athreya.tech/awesome-features-in-jenkins-which-makes-it-interesting-for-beginners-part-1</link><guid isPermaLink="true">https://athreya.tech/awesome-features-in-jenkins-which-makes-it-interesting-for-beginners-part-1</guid><category><![CDATA[Jenkins]]></category><category><![CDATA[Continuous Integration]]></category><category><![CDATA[continuous deployment]]></category><category><![CDATA[Build tool]]></category><category><![CDATA[GCP]]></category><dc:creator><![CDATA[Athreya Patel]]></dc:creator><pubDate>Sun, 26 Apr 2020 12:40:55 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1587904850888/cwAWk3Z5e.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>Now, your team wants a automated solution for Continuous Integration and Continuous Deployment. You find <strong>Jenkins</strong> is one of the most <strong>popular</strong> tool and start with it.</p>
<p>Eventually you find Jenkins boring with the same interface and user experience. <strong>Follow these tips to make your Jenkins interesting!!</strong></p>
<h2 id="lets-start-with-ui">Lets start with UI</h2>
<h2 id="1-blueocean-plugin">1. BlueOcean Plugin</h2>
<p>In Jenkins, whenever we need to add some features, we do it by installing plugins. These plugins are available in Manage Jenkins &gt; Manage Plugins &gt; Available section.</p>
<p>Search for <a target='_blank' rel='noopener noreferrer'  href="https://plugins.jenkins.io/blueocean/">Blue Ocean</a> &gt; Select Blue Ocean and checkbox it. Then click on “Install without restart”</p>
<p>Wait for it to install Blue Ocean with its dependencies.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1587904696765/g6eGp7cKQ.png" alt="Annotation 2020-04-26 172109.png"></p>
<p>Now you have “Open Blue Ocean” option. Click on it. Now you have a whole new different UI and you notice it is a Single Page Application built with React. Selecting the pipeline gives you the builds run.</p>
<p>Advantage over Jenkins UI is</p>
<ol>
<li>It gives different UI and UX.</li>
<li>It provides better representation of pipeline stages. Consider the pipeline has stages to be skipped for certain builds. This provides the better representation which is the process which is undergone in that specific build.</li>
</ol>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1587904741876/NmUxr7Ij6.png" alt="1_8DJ0oewT_qwDDoAyWo_ncw.png"></p>
<h2 id="2-adding-css-for-the-ui">2. Adding CSS for the UI</h2>
<p>Now, for some reason you still want to use Jenkins without Blue Ocean. You can use it better UI by tweaking some CSS.</p>
<p>We can add CSS to the already existing traditional Jenkins UI with a plugin called <a target='_blank' rel='noopener noreferrer'  href="https://plugins.jenkins.io/simple-theme-plugin/">Simple Theme</a>.</p>
<p>Lets install it from Manage Jenkins &gt; Manage Plugins &gt; Search for Simple Theme &gt; Install without restart</p>
<p>Then Manage Jenkins &gt; Configure System &gt; Go to “Themes” section &gt; Click on Add Button</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1587904770989/h71qih5zI.png" alt="1_Y3tVB225uddQzLR494DMiA.png"></p>
<p>Search for Jenkins Themes in Google to find the CSS themes &gt; Select the one based on your taste &gt; Add the URL</p>
<p>I personally prefer <a target='_blank' rel='noopener noreferrer'  href="https://tobix.github.io/jenkins-neo2-theme/"><strong>Neo2 Theme</strong></a><strong>.</strong></p>
<p>I have the link which has the css file. Apply &amp; Save..</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1587904786811/Q_OzOmq8M.png" alt="Annotation 2020-04-26 17210.png"></p>
<p><em>Thats it for the first part!</em></p>
<p>Will be continuing with some tweaks which we can do Jenkins in the next Part.</p>
<p><em>Stay tuned!</em></p>
<p><em>Any changes in the blog are welcome</em></p>
<p><em>Thanks</em></p>
<p><strong><em>You can my follow blogs at</em></strong> <a target='_blank' rel='noopener noreferrer'  href="https://blog.athreyapatel.codes/"><strong><em>https://blog.athreyapatel.codes/</em></strong></a></p>
]]></content:encoded></item></channel></rss>