<?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" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Gustavo Apolinario on Medium]]></title>
        <description><![CDATA[Stories by Gustavo Apolinario on Medium]]></description>
        <link>https://medium.com/@gustavo.guss?source=rss-ff5458825300------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*_CKVbt3mTqundV2AI1pFqw.jpeg</url>
            <title>Stories by Gustavo Apolinario on Medium</title>
            <link>https://medium.com/@gustavo.guss?source=rss-ff5458825300------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Mon, 30 Nov 2026 11:09:13 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@gustavo.guss/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Node.js fastest API crud]]></title>
            <link>https://medium.com/@gustavo.guss/node-js-fastest-api-crud-7da722dcec4f?source=rss-ff5458825300------2</link>
            <guid isPermaLink="false">https://medium.com/p/7da722dcec4f</guid>
            <category><![CDATA[api]]></category>
            <category><![CDATA[mongodb]]></category>
            <category><![CDATA[nodejs]]></category>
            <category><![CDATA[node-restful]]></category>
            <category><![CDATA[expressjs]]></category>
            <dc:creator><![CDATA[Gustavo Apolinario]]></dc:creator>
            <pubDate>Thu, 30 Aug 2018 23:51:55 GMT</pubDate>
            <atom:updated>2018-08-30T23:51:55.220Z</atom:updated>
            <content:encoded><![CDATA[<p>I’m searching the best tool to create simple Rest API and find a option with minimum work. For a simple REST API with only database logic you don’t need a lot of work creating a crud. It is for help in this case, but if necessary you can manipulate and script your code for request.</p><p>It’s a combination of packages: node-restful, express and mongoose.</p><p>Let’s start explanation from database to request.</p><p>First <a href="https://www.mongodb.com/">mongodb</a>, it is a open source database NoSQL.</p><p>Second <a href="https://mongoosejs.com/">mongoose</a>, it’s mongodb bject modeling. With mongoose you choose how is your table. For this project, you only need change the mongoose configuration to change all your API.</p><p>Ex: In this code use create a model to accept 4 inputs.</p><pre>const restful = require(&#39;node-restful&#39;)<br>const mongoose = restful.mongoose</pre><pre>const todoSchema = new mongoose.Schema({<br>  description: { type: String, required: true, index: true },<br>  number: { type: Number, min: 1, max: 200, required: true, index: true },<br>  done: { type: Boolean, required: true, default: false },<br>  createdAt: { type: Date, default: Date.now, index: true }<br>})</pre><pre>module.exports = restful.model(&#39;Todo&#39;, todoSchema)</pre><p>Third <a href="https://www.npmjs.com/package/node-restful">node-restful</a>. This package create the crud for us and connect the request with mongoose. With this package, we don’t need create a lot of scripts to accept GET, POST, PUT, DELETE requests.</p><p>Ex: after mongoose configured, let’s import this and create the method requests accepted.</p><blockquote>require(‘./todo’) is calling the mongoose explained</blockquote><pre>const Todo = require(&#39;./todo&#39;)</pre><pre>Todo.methods([&#39;get&#39;, &#39;post&#39;, &#39;put&#39;, &#39;delete&#39;])</pre><pre>Todo.updateOptions({new: true, runValidators: true})</pre><pre>module.exports = Todo</pre><p>Now, to node.js create a server, accept the requests and send the request to node-restful, we will use express.</p><blockquote>require(‘../api/todo/todoService’) is calling the node-restful explained</blockquote><pre>const bodyParser = require(&#39;body-parser&#39;)<br>const express = require(&#39;express&#39;)<br>const server = express()<br>const queryParser = require(&#39;express-query-int&#39;)</pre><pre>server.use(bodyParser.urlencoded({ extended: true }))</pre><pre>server.use(bodyParser.json())</pre><pre>server.use(queryParser())</pre><pre>server.listen( 3001, function () {</pre><pre>  console.log(&quot;Express server listening on port 3001&quot;);</pre><pre>});<br></pre><pre>const router = express.Router()</pre><pre>server.use(&#39;/&#39;, router)</pre><pre>const todo = require(&#39;../api/todo/todoService&#39;)</pre><pre>todo.register(router, &#39;/todo&#39;)</pre><p>This create the nodejs server and create the connection between express and node-restfull. All requests in <em>localhost:3000/todo</em> will call the node-restfull API.</p><p>It is all this you need to create a simple Rest.</p><p>And if we want change this? You only needs change the mongoose and all the requests (GET, POST, PUT…) will adept to it.</p><p>Wants a example? see my todo-backend project</p><p><a href="https://github.com/gustavoapolinario/node-todo-backend">gustavoapolinario/node-todo-backend</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7da722dcec4f" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Jenkins send email with attachment]]></title>
            <link>https://medium.com/@gustavo.guss/jenkins-send-email-with-attachment-cec1e052583a?source=rss-ff5458825300------2</link>
            <guid isPermaLink="false">https://medium.com/p/cec1e052583a</guid>
            <category><![CDATA[jenkins]]></category>
            <category><![CDATA[pipeline]]></category>
            <category><![CDATA[attachment]]></category>
            <category><![CDATA[email]]></category>
            <dc:creator><![CDATA[Gustavo Apolinario]]></dc:creator>
            <pubDate>Thu, 30 Aug 2018 23:42:22 GMT</pubDate>
            <atom:updated>2018-08-30T23:42:22.040Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/600/1*fct_GqxR-1ha9wFX7pxEBw.jpeg" /></figure><p>This tutorial is a complement for my other tutorial: <a href="https://medium.com/@gustavo.guss/jenkins-sending-email-on-post-build-938b236545d2">Jenkins sending email on post build</a>.</p><p>Now, we will send a email with attachment.</p><p>The last code was:</p><pre>emailext<br>     body: &quot;${currentBuild.currentResult}: Job ${env.JOB_NAME} build ${env.BUILD_NUMBER}\n More info at: ${env.BUILD_URL}&quot;,<br>     recipientProviders: [[$class: &#39;DevelopersRecipientProvider&#39;], [$class: &#39;RequesterRecipientProvider&#39;]],<br>     subject: &quot;Jenkins Build ${currentBuild.currentResult}: Job ${env.JOB_NAME}&quot;</pre><p>And now, let’s add the attachment file:</p><pre>emailext <strong>attachmentsPattern: &#39;generatedFile.txt&#39;</strong>,<br>     body: &quot;${currentBuild.currentResult}: Job ${env.JOB_NAME} build ${env.BUILD_NUMBER}\n More info at: ${env.BUILD_URL}&quot;,<br>     recipientProviders: [developers(), requestor()],<br>     subject: &quot;Jenkins Build ${currentBuild.currentResult}: Job ${env.JOB_NAME}&quot;</pre><p>If you want, you can send the build log too.</p><pre>emailext <strong>attachLog: true</strong>,<br>     body: &quot;${currentBuild.currentResult}: Job ${env.JOB_NAME} build ${env.BUILD_NUMBER}\n More info at: ${env.BUILD_URL}&quot;,<br>     recipientProviders: [developers(), requestor()],<br>     subject: &quot;Jenkins Build ${currentBuild.currentResult}: Job ${env.JOB_NAME}&quot;</pre><p>The final code is:</p><pre>pipeline {<br>    agent any<br>    <br>    stages {<br>        stage(&#39;Download&#39;) {<br>            steps {<br>                sh &#39;echo &quot;artifact file&quot; &gt; generatedFile.txt&#39;<br>            }<br>        }<br>    }<br>    post {<br>        always {<br>            archiveArtifacts artifacts: &#39;generatedFile.txt&#39;, onlyIfSuccessful: true<br>            <br>            echo &#39;I will always say Hello again!&#39;<br>                <br>            emailext <strong>attachLog: true, attachmentsPattern: &#39;generatedFile.txt&#39;</strong>,<br>                body: &quot;${currentBuild.currentResult}: Job ${env.JOB_NAME} build ${env.BUILD_NUMBER}\n More info at: ${env.BUILD_URL}&quot;,<br>                recipientProviders: [developers(), requestor()],<br>                subject: &quot;Jenkins Build ${currentBuild.currentResult}: Job ${env.JOB_NAME}&quot;<br>            <br>        }<br>    }<br>}</pre><p>But think, your logs and files are in jenkins, you need send them by e-mail? Maybe only a link to your build page could resolve?</p><p>Thanks.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=cec1e052583a" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Jenkins archive artifact/save file in Pipeline]]></title>
            <link>https://medium.com/@gustavo.guss/jenkins-archive-artifact-save-file-in-pipeline-ac6d8b569c2c?source=rss-ff5458825300------2</link>
            <guid isPermaLink="false">https://medium.com/p/ac6d8b569c2c</guid>
            <category><![CDATA[pipeline]]></category>
            <category><![CDATA[archive]]></category>
            <category><![CDATA[jenkins]]></category>
            <dc:creator><![CDATA[Gustavo Apolinario]]></dc:creator>
            <pubDate>Thu, 30 Aug 2018 23:04:09 GMT</pubDate>
            <atom:updated>2018-08-30T23:28:12.255Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/600/1*J_s2c1cxU4nNnfe3ZYCZpw.jpeg" /></figure><p>In this tutorial i will show how to save files “outside build workspace” to get after others builds.</p><p>First let’s understand what is archieve file in jenkins and why we need this.</p><p>Archive is how to save files outside workspace. You can clean your workspace, run other builds and the file archieved is safe.</p><p>Ex: You build the jar/html/js file, this file is important for deploy. After other build, your file is replaced or can be removed. If you want get the older file, you need archive it.</p><p>For do that is simple, only with one command you can artifact your files.</p><pre>archiveArtifacts artifacts: &#39;file.extension&#39;</pre><p>You can save one or multiple artifacts.</p><p>Let’s see some examples</p><p>To save a single file named ‘teste.js’ :</p><pre>archiveArtifacts artifacts: &#39;teste.js&#39;</pre><p>To save multiple files:</p><pre>archiveArtifacts artifacts: &#39;*.js&#39;</pre><p>To save multiple files from a specific folder:</p><pre>archiveArtifacts artifacts: &#39;build/*.js&#39;</pre><p>You can save only if is a successful build.</p><pre>archiveArtifacts artifacts: &#39;teste.js&#39;, onlyIfSuccessful: true</pre><p>Let’s see a final example in pipeline:</p><p>The build will create a file named generatedFile.txt and after build, archive it only if is a successful build.</p><pre>pipeline {<br>    agent any<br>    <br>    stages {<br>        stage(&#39;Download&#39;) {<br>            steps {<br>                sh &#39;echo &quot;artifact file&quot; &gt; generatedFile.txt&#39;<br>            }<br>        }<br>    }<br>    post {<br>        always {<br>            archiveArtifacts artifacts: &#39;generatedFile.txt&#39;, onlyIfSuccessful: true<br>        }<br>    }<br>}</pre><p>And a another method is save files from any folder or sub folder.</p><p>This is very useful to save files if you know the name of files, but your files are spreaded in different folders.</p><p>ex: you need save the files:</p><ul><li>js/build.min.js</li><li>css/build.min.js</li></ul><pre>archiveArtifacts artifacts: &#39;**/*.min.*&#39;</pre><p>Example of complete script to save this files:</p><pre>pipeline {<br>    agent any<br>    <br>    stages {<br>        stage(&#39;Download&#39;) {<br>            steps {<br>                sh &#39;mkdir js&#39;<br>                sh &#39;echo &quot;not a artifact file&quot; &gt; js/build.js&#39;<br>                sh &#39;echo &quot;artifact file&quot; &gt; js/build.min.js&#39;<br>                <br>                sh &#39;mkdir css&#39;<br>                sh &#39;echo &quot;not a artifact file&quot; &gt; css/build.css&#39;<br>                sh &#39;echo &quot;artifact file&quot; &gt; css/build.min.css&#39;<br>            }<br>        }<br>    }<br>    post {<br>        always {<br>            archiveArtifacts artifacts: &#39;**/*.min.*&#39;, onlyIfSuccessful: true<br>        }<br>    }<br>}</pre><p>Thanks for read.</p><p>To see more about archive artifact in jenkins:</p><ul><li><a href="https://jenkins.io/doc/pipeline/steps/core/">Core</a></li><li><a href="https://jenkins.io/doc/pipeline/tour/tests-and-artifacts/">Recording tests and artifacts</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ac6d8b569c2c" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Using gohugo to build a static Website]]></title>
            <link>https://medium.com/@gustavo.guss/using-gohugo-to-build-a-static-website-b18ac9da7d19?source=rss-ff5458825300------2</link>
            <guid isPermaLink="false">https://medium.com/p/b18ac9da7d19</guid>
            <category><![CDATA[aws]]></category>
            <dc:creator><![CDATA[Gustavo Apolinario]]></dc:creator>
            <pubDate>Mon, 28 May 2018 18:59:13 GMT</pubDate>
            <atom:updated>2018-05-28T18:59:13.232Z</atom:updated>
            <content:encoded><![CDATA[<p>You want create a website or blog? You has a lot of tools to do that.</p><blockquote>What is hugo?</blockquote><p>Hugo is a open-source static site generator. With this you can host your site in any place. You don’t need php, java, ruby, node.js, anything. You only need a server for static files.</p><blockquote>Why i should use static files?</blockquote><p>Static files are very fast, the server only need get your files and send to client. With php or java or others server-side languages, the server will process the request and send the result to client. It can be faster if you cache your requests in server, but it will process to test if the site has a cache.</p><blockquote>Where i can host my static website?</blockquote><p>You can host in any server. All servers has a method to send static files. All website has css, javascript. This files normally are static.</p><p>The best options in my opinion is AWS S3, Firebase host or github. But search the best server for you, think what is better for you now and to the future.</p><p>In my case, i’m using the firebase host to test the hugo. I put some posts to test it. You can see here:</p><p><a href="https://condevops.firebaseapp.com/">ConDevOps</a></p><p>More about Gohugo or static host:</p><ul><li><a href="https://gohugo.io/">The world&#39;s fastest framework for building websites</a></li><li><a href="https://gohugo.io/hosting-and-deployment/">Hosting &amp; Deployment</a></li><li><a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/WebsiteHosting.html">Hosting a static website using Amazon S3</a></li><li><a href="https://firebase.google.com/docs/hosting/?hl=pt-br">Firebase Hosting | Firebase</a></li><li><a href="https://help.github.com/articles/configuring-a-publishing-source-for-github-pages/">Configuring a publishing source for GitHub Pages - User Documentation</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b18ac9da7d19" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Jenkins sending email on post build]]></title>
            <link>https://medium.com/@gustavo.guss/jenkins-sending-email-on-post-build-938b236545d2?source=rss-ff5458825300------2</link>
            <guid isPermaLink="false">https://medium.com/p/938b236545d2</guid>
            <category><![CDATA[pipeline]]></category>
            <category><![CDATA[email]]></category>
            <category><![CDATA[jenkins]]></category>
            <dc:creator><![CDATA[Gustavo Apolinario]]></dc:creator>
            <pubDate>Mon, 14 May 2018 00:16:13 GMT</pubDate>
            <atom:updated>2019-04-02T16:30:12.851Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/600/1*qzDG-ROC1aUkVZ-LYVe5pA.jpeg" /></figure><p>After Build you need communicate the persons who can be responsables for the build failure.</p><p><em>You may want send a slack notification too: </em><a href="https://medium.com/@gustavo.guss/quick-tutorial-of-jenkins-b99d5f5889f2"><em>https://medium.com/@gustavo.guss/quick-tutorial-of-jenkins-b99d5f5889f2</em></a></p><h3>Installing Email Extended</h3><p>Go to Manage Jenkins &gt; Manage Plugins &gt; click on tab Available and search for “Email Extension”.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/716/1*mjuibv68FOl_hqaNBQ9DZQ.png" /></figure><p>If you find, install it. If you don’t find it, search in Installed tab because it can be installed.</p><h3>Configuring Email Extended</h3><p>To send email, the plugin needs the smtp configured.</p><p>Go to Manage Jenkins &gt; Configure System &gt; search for “Extended E-mail Notification”.</p><p>Configure the smtp.</p><p>Example: My configuration with gmail smtp.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1012/1*qr6slvxrqM_SyvKeNuHxRw.png" /></figure><h3>Testing Mail sender</h3><p>Go to home of jenkins and create a new job. Select pipeline and name it as “SendMail-test”.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/946/1*J6lH-xOaZmshuywn66WrUQ.png" /></figure><p>Put this pipeline in new job:</p><pre>pipeline {<br>    agent any<br>    <br>    stages {<br>        stage(&#39;Ok&#39;) {<br>            steps {<br>                echo &quot;Ok&quot;<br>            }<br>        }<br>    }<br>    post {<br>        always {<br>            emailext body: &#39;A Test EMail&#39;, recipientProviders: [[$class: &#39;DevelopersRecipientProvider&#39;], [$class: &#39;RequesterRecipientProvider&#39;]], subject: &#39;Test&#39;<br>        }<br>    }<br>}</pre><p>This pipeline run in any jenkins agent: (you can has jenkins agents to run code outside your master jenkins server)</p><pre>agent any</pre><p>It has a stage to sample</p><pre>stages {<br>    stage(&#39;Ok&#39;) {<br>        steps {<br>            echo &quot;Ok&quot;<br>        }<br>    }<br>}</pre><p>In post step, you can run any script you want. We have the mail sender in it.</p><pre>post {<br>    always {<br>        emailext body: &#39;A Test EMail&#39;, recipientProviders: [[$class: &#39;DevelopersRecipientProvider&#39;], [$class: &#39;RequesterRecipientProvider&#39;]], subject: &#39;Test&#39;<br>    }<br>}</pre><p>Save it and run clicking in “Build Now” on job menu.</p><p>The build will apear in stage view (if necessary reload the page).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/491/1*z54vv_NIwAM8xejUgNf91Q.png" /></figure><p>Click on Build Number “#1” and click on “Console Output” on build menu.</p><p>The output will be like this:</p><pre>Started by user <a href="http://localhost:8082/user/gustavo">GUSTAVO WILLY APOLINARIO DOMINGUES</a><br>Running in Durability level: MAX_SURVIVABILITY<br>[Pipeline] node<br>Running on <a href="http://localhost:8082/computer/(master)/">Jenkins</a> in /var/jenkins_home/workspace/SendMail-test<br>[Pipeline] {<br>[Pipeline] stage<br>[Pipeline] { (Ok)<br>[Pipeline] echo<br>Ok<br>[Pipeline] }<br>[Pipeline] // stage<br>[Pipeline] stage<br>[Pipeline] { (Declarative: Post Actions)<br>[Pipeline] emailext<br>Sending email to: abc gustavo.guss@gmail.com<br>Successfully sent to the following addresses: gustavo.guss@gmail.com<br>[Pipeline] }<br>[Pipeline] // stage<br>[Pipeline] }<br>[Pipeline] // node<br>[Pipeline] End of Pipeline<br>Finished: SUCCESS</pre><p>Go to your email. You must receive a new email like this:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/431/1*auB9M4Z5KndEpcQizFchKA.png" /></figure><h3>Changing Sender Name</h3><p>You receive the email, but the sender name is ugly. To change it, go to Manage Jenkins &gt; Configure System.</p><p>Search for “System Admin e-mail address” (In Jenkins Location).</p><p>Change it to: “Jenkins &lt;jenkins@jenkins&gt;”</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/518/1*UOcf8pd4BSmf1RKzPsAObg.png" /></figure><p>Save and run the job again.</p><p>The new message has “Jenkins” as sender name.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/461/1*trbn48ZqiM6JN4_Uauh0pw.png" /></figure><h3>Sending a post build email with job information</h3><p>To send a real post build email, create a new pipelinejob and name it as “sample-sender-email”.</p><p>Put this pipeline:</p><pre>pipeline {<br>    environment {<br>        //This variable need be tested as string<br>        doError = &#39;1&#39;<br>    }<br>   <br>    agent any<br>    <br>    stages {<br>        stage(&#39;Error&#39;) {<br>            when {<br>                expression { doError == &#39;1&#39; }<br>            }<br>            steps {<br>                echo &quot;Failure&quot;<br>                error &quot;failure test. It&#39;s work&quot;<br>            }<br>        }<br>        <br>        stage(&#39;Success&#39;) {<br>            when {<br>                expression { doError == &#39;0&#39; }<br>            }<br>            steps {<br>                echo &quot;ok&quot;<br>            }<br>        }<br>    }<br>    post {<br>        always {<br>            echo &#39;I will always say Hello again!&#39;<br>            <br>            emailext body: &quot;${currentBuild.currentResult}: Job ${env.JOB_NAME} build ${env.BUILD_NUMBER}\n More info at: ${env.BUILD_URL}&quot;,<br>                recipientProviders: [[$class: &#39;DevelopersRecipientProvider&#39;], [$class: &#39;RequesterRecipientProvider&#39;]],<br>                subject: &quot;Jenkins Build ${currentBuild.currentResult}: Job ${env.JOB_NAME}&quot;<br>            <br>        }<br>    }<br>}</pre><p>This script is a test to you try the post build. You can see more about post build here: <a href="https://medium.com/@gustavo.guss/how-to-do-post-build-in-jenkins-pipeline-d1e7233909b8">https://medium.com/@gustavo.guss/how-to-do-post-build-in-jenkins-pipeline-d1e7233909b8</a></p><p>Changing the variable “doError” you can test the failure/success build.</p><p>Save and run this job. See your email and you will receive this:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/420/1*sHZ8A_8wwbVjFBPzDuyrNw.png" /></figure><p>Great! post build configured, you will receive email in all build.</p><p>You can change the mail to send only in failure if prefer. (change “always” to “failure”).</p><p>You can configure the default value for the plugn. To it, go to Jenkins &gt; Configure System &gt; Extended E-mail Notification</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*wz9DbFm9sxIvnmNZA5ukwQ.png" /><figcaption>jenkins extended e-mail notification configuration for default values</figcaption></figure><p>Edit your default value and when you call, use something like that:</p><pre>emailext body: &quot;${DEFAULT_CONTENT}&quot;,<br>                recipientProviders: [[$class: &#39;DevelopersRecipientProvider&#39;], [$class: &#39;RequesterRecipientProvider&#39;]],<br>                subject: &quot;${DEFAULT_SUBJECT}&quot;</pre><p>Thanks.</p><p>You can see more at:</p><ul><li><a href="https://jenkins.io/doc/pipeline/steps/email-ext/">Email Extension Plugin</a></li><li><a href="https://wiki.jenkins.io/display/JENKINS/Email-ext+plugin">Email-ext plugin - Jenkins - Jenkins Wiki</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=938b236545d2" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to do Post Build in Jenkins Pipeline]]></title>
            <link>https://medium.com/@gustavo.guss/how-to-do-post-build-in-jenkins-pipeline-d1e7233909b8?source=rss-ff5458825300------2</link>
            <guid isPermaLink="false">https://medium.com/p/d1e7233909b8</guid>
            <category><![CDATA[pipeline]]></category>
            <category><![CDATA[jenkins]]></category>
            <dc:creator><![CDATA[Gustavo Apolinario]]></dc:creator>
            <pubDate>Thu, 10 May 2018 23:11:21 GMT</pubDate>
            <atom:updated>2018-05-14T00:14:52.333Z</atom:updated>
            <content:encoded><![CDATA[<p>It’s a sample of how to do post build using pipeline inside jenkins.</p><p>In some builds, we want to run codes after build. Some times you need run if job fail, or success, or always.</p><h3>Explanation when use post build</h3><p>First, let’s do some pipeline</p><pre>pipeline {<br>  agent any<br>  stages {<br>    stage(‘Error’) {<br>      steps {<br>        error “failure test. It’s work”<br>      }<br>    }<br>    stage(‘ItNotWork’) {<br>      steps {<br>        echo “is not pass here”<br>        echo “You can’t do post build in other stage”<br>      }<br>    }<br>  }<br>}</pre><p>This pipeline have two stages, ‘Error’ and ‘ItNotWork’.</p><p>The first stage will get error and the second stage will not run.</p><p>If you need a code to run after build, you can put in post build.</p><pre>pipeline {<br>  agent any<br>  stages {<br>    stage(‘Error’) {<br>      steps {<br>        error “failure test. It’s work”<br>      }<br>    }<br>    stage(‘ItNotWork’) {<br>      steps {<br>        echo “is not pass here”<br>      }<br>   }<br>  }<br>  post {<br>    success {<br>      mail to: team@example.com, subject: ‘The Pipeline success :(‘<br>    }<br>  }<br>}</pre><h3>Eteps in post build</h3><p>In Post Build you have a lot of steps, let’s talk about the two most usefull steps.</p><h3>Always</h3><p>If you want to run everytime after your work is finished, you can use the step “always”</p><pre>pipeline {<br>  agent any<br>  stages {<br>    …<br>  }<br>  post {<br>    always {<br>      echo ‘I will always execute this!’<br>    }<br>  }<br>}</pre><h3>Failure</h3><p>If you want execute some code only if the build fail, you can use the step “failure”</p><pre>pipeline {<br>  agent any<br>  stages {<br>    …<br>  }<br>  post {<br>    failure {<br>      mail to: team@example.com, subject: ‘The Pipeline failed :(‘<br>    }<br>  }<br>}</pre><h3>How i can do test in this steps</h3><p>For study, i created a job to test this steps easely.</p><pre>pipeline {<br>  environment {<br>    //This variable need be tested as string<br>    doError = ‘1’<br>  }<br>  agent any<br>  stages {<br>    stage(‘Error’) {<br>      when {<br>        expression { doError == ‘1’ }<br>      }<br>      steps {<br>        echo “Failure”<br>        error “failure test. It’s work”<br>      }<br>    }<br>    stage(‘Success’) {<br>      when {<br>        expression { doError == ‘0’ }<br>      }<br>      steps {<br>        echo “ok”<br>      }<br>    }<br>  }<br>  post {<br>    always {<br>      echo ‘I will always execute this!’<br>    }<br>  }<br>}</pre><p>You can test how work post build only changing the environment “doError”.</p><p>Try yourself.</p><h3>More</h3><p>More information about “Post” section you can see in <a href="https://jenkins.io/doc/book/pipeline/syntax/#post">Jenkins Documentation</a></p><p>Thanks</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d1e7233909b8" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Jenkins Building Docker Image and Sending to Registry]]></title>
            <link>https://medium.com/@gustavo.guss/jenkins-building-docker-image-and-sending-to-registry-64b84ea45ee9?source=rss-ff5458825300------2</link>
            <guid isPermaLink="false">https://medium.com/p/64b84ea45ee9</guid>
            <category><![CDATA[docker-registry]]></category>
            <category><![CDATA[docker]]></category>
            <category><![CDATA[pipeline]]></category>
            <category><![CDATA[jenkins]]></category>
            <category><![CDATA[dockerhub]]></category>
            <dc:creator><![CDATA[Gustavo Apolinario]]></dc:creator>
            <pubDate>Sat, 05 May 2018 15:35:39 GMT</pubDate>
            <atom:updated>2019-01-26T23:06:23.662Z</atom:updated>
            <content:encoded><![CDATA[<p>Hi everyone. In this tutorial we will create a docker image with jenkins and send then to dockerhub.</p><p>What’s docker?<br>Docker is an open platform for developers and sysadmins to build, ship, and run distributed applications.</p><p>You can learn more about docker in <a href="https://www.docker.com/">docker website</a></p><p>Why pipeline?<br>You can reuse everything you did, put your jenkins code inside git project, the change in pipeline is showed in “changes” inside job history</p><p>What’s dockerhub?<br>Dockerhub is a public docker registry to store your docker images inside. If you want a private registry, you can pay for it. We will use it because it is the most easeful docker registry.</p><p>What’s docker registy?<br>Docker registry is a server to distribute versions of docker images.</p><h3>Jenkins with docker installed</h3><p>We will use some pipeline codes, the jenkins need have installed docker inside him to find this commands.</p><p>I created a docker image of jenkins with docker installed.</p><p>Let’s see the Dockerfile:</p><pre>FROM jenkins/jenkins:lts</pre><pre>USER root</pre><pre>RUN apt-get update &amp;&amp; \<br>apt-get -y install apt-transport-https \<br>    ca-certificates \<br>    curl \<br>    gnupg2 \<br>    software-properties-common &amp;&amp; \<br>curl -fsSL https://download.docker.com/linux/$(. /etc/os-release; echo &quot;$ID&quot;)/gpg &gt; /tmp/dkey; apt-key add /tmp/dkey &amp;&amp; \<br>add-apt-repository \<br>    &quot;deb [arch=amd64] https://download.docker.com/linux/$(. /etc/os-release; echo &quot;$ID&quot;) \<br>    $(lsb_release -cs) \<br>    stable&quot; &amp;&amp; \<br>apt-get update &amp;&amp; \<br>apt-get -y install docker-ce</pre><pre>RUN apt-get install -y docker-ce</pre><pre>RUN usermod -a -G docker jenkins</pre><pre>USER jenkins</pre><p>This Dockerfile is builded from jenkins official image, install docker and give access to user jenkins build dockers.</p><p>You can build this image, but is already in dockerhub <a href="https://hub.docker.com/r/gustavoapolinario/jenkins-docker/">gustavoapolinario/jenkins-docker</a>.</p><h3>Running jenkins with docker from host</h3><p>To run the container, you need add a volume in docker run command.</p><pre>… -v /var/run/docker.sock:/var/run/docker.sock …</pre><p>It will share the docker socket (used in your machine) with the container.</p><p>The complete run command:</p><pre>docker run --name jenkins-docker -p 8080:8080 -v /var/run/docker.sock:/var/run/docker.sock gustavoapolinario/jenkins-docker</pre><p>After inicialized the jenkins, complete the jenkins startup wizard.</p><p>Read this tutorial to complete wizard and install the locale and blueocean plugins: <a href="https://medium.com/@gustavo.guss/quick-tutorial-of-jenkins-b99d5f5889f2">Quick start with jenkins in docker</a>.</p><h3>Creating a job to test docker command</h3><p>In home of jenkins, click on “New Item”, select “Pipeline” and put the job name as “docker-test”.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/949/1*AOhFjXEjDFA6-_qZndYHKA.png" /><figcaption>New pipeline Job</figcaption></figure><p>Put this script inside of job:</p><pre>pipeline {</pre><pre>  environment {<br>    registry = &quot;docker_hub_account/repository_name&quot;<br>    registryCredential = &#39;dockerhub&#39;<br>  }</pre><pre>  agent any</pre><pre>  stages {<br>    stage(&#39;Building image&#39;) {<br>      steps{<br>        script {<br>          docker.build registry + &quot;:$BUILD_NUMBER&quot;<br>        }<br>      }<br>    }<br>  }<br>}</pre><p>The screen will be like this:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/779/1*8uUDBmPQP0srQ535hog7eA.png" /><figcaption>Pipeline in job config</figcaption></figure><p>Save the job.</p><h3>Pipeline explanation</h3><p>In this pipeline, We have 2 environment variables to change the registry and the credential easeful.</p><pre>environment {<br>    registry = &quot;docker_hub_account/repository_name&quot;<br>    registryCredential = &#39;dockerhub&#39;<br>}</pre><p>The job will have one step. It will run the docker build and use the jenkins build number in docker tag. With build number turn easeful to deploy or rollback based in jenkins.</p><pre>stages {<br>  stage(&#39;Building image&#39;) {<br>    steps{<br>      script {<br>        docker.build registry + &quot;:$BUILD_NUMBER&quot;<br>      }<br>    }<br>  }<br>}</pre><h3>Testing the docker command in job</h3><p>Click on “Build Now” in job’s menu.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/190/1*0c8bTy4r2BWqHcLIanzSmw.png" /><figcaption>Job Menu</figcaption></figure><p>The job will failure. Don’t worry.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/360/1*vorTjPVmv_GPnA64MR_sqg.png" /><figcaption>Build Failure</figcaption></figure><p>In job’s home, you can click in circle and see the console output.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/334/1*Jxs3VqmlgZb4QFpgYISBNg.png" /><figcaption>Build History</figcaption></figure><p>Or click on build number (<strong>#1</strong>) and click on “Console Output”.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/245/1*cr_mEq3O9jhJMLuT6eiKtA.png" /><figcaption>Job Build Menu</figcaption></figure><p>In Console Output you will see this:</p><pre>Started by user GUSTAVO WILLY APOLINARIO DOMINGUES<br>Running in Durability level: MAX_SURVIVABILITY<br>[Pipeline] node<br>Running on Jenkins in /var/jenkins_home/workspace/docker-test<br>[Pipeline] {<br>[Pipeline] withEnv<br>[Pipeline] {<br>[Pipeline] stage<br>[Pipeline] { (Building image)<br>[Pipeline] script<br>[Pipeline] {<br>[Pipeline] sh<br>[teste234] Running shell script<br>+ docker build -t docker_hub_account/repository_name:1 .<br>unable to prepare context: unable to evaluate symlinks in Dockerfile path: lstat /var/jenkins_home/workspace/docker-test/Dockerfile: no such file or directory<br>[Pipeline] }<br>[Pipeline] // script<br>[Pipeline] }<br>[Pipeline] // stage<br>[Pipeline] }<br>[Pipeline] // withEnv<br>[Pipeline] }<br>[Pipeline] // node<br>[Pipeline] End of Pipeline<br>ERROR: script returned exit code 1<br>Finished: FAILURE</pre><p>The error happens because the Dockerfile is not finded. We will resolve it soon.</p><p>The docker command is executed and the jenkins found the command.</p><h3>Creating a dockerhub repository</h3><p>Create a dockerhub account, if you don’t have yet.</p><p><a href="https://hub.docker.com/">dockerhub</a></p><p>Logged in dockerhub, click on “Create” &gt; “Create Repository”.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/899/1*D258MaAtrns22PNb43PZ2A.png" /><figcaption>Dockerhub menu to Create Repository</figcaption></figure><p>Put a name for your repository. For this example, use “docker-test”.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/792/1*mv3u-C-pBuunRpkKY76Htg.png" /><figcaption>Creating Dockerhub Repository</figcaption></figure><p>After docker repository created, get the name to use in our pipeline. In my case, the name is <strong>“gustavoapolinario/docker-test”</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/566/1*zKZn7qUeYJpIxTOD07uJFw.png" /><figcaption>Dockerhub Repository</figcaption></figure><h3>Creating dockerhub credential</h3><p>Go to jenkins home, click on “credentials” and “<strong>(global)</strong>”.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/339/1*guAIzZKGQKtiFl1cBwS-fg.png" /><figcaption>Credentials</figcaption></figure><p>Click on “Add Credentials” in left menu.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/652/0*vxqWENhcjf964sbc.png" /></figure><p>Put your credential and save it.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/458/0*3FPJJ2mpplNpp7ky.png" /></figure><p>Remenber to change the credential environment (registryCredential) if you didn’t put <strong>“dockerhub”</strong> in Credential ID.</p><p>The credential is configured.</p><h3>Configuring the environment of dockerhub</h3><p>Alter the job pipeline. Go to jenkins home, click on job name (docker-test), click on “Configure” in job menu.</p><p>The code you need to change is:</p><pre>environment {<br>    registry = &quot;docker_hub_account/repository_name&quot;<br>    registryCredential = ‘dockerhub’<br>}</pre><p>Change the environment variable “registry” to your repository name. In my case is <strong>“gustavoapolinario/docker-test”</strong>.</p><p>Change the environment variable “registryCredential” if necessary.</p><p>My environment is:</p><pre>environment {<br>    registry = &quot;gustavoapolinario/docker-test&quot;<br>    registryCredential = ‘dockerhub’<br>}</pre><h3>Building the first docker image</h3><p>With dockerhub credential and repository created, the jenkins can send the docker image builded to dockerhub (our docker repository).</p><p>In this example, let’s build a node.js application. We need a Dockerfile to the build.</p><p>Let’s create a new step in pipeline to clone a git repository that have a Dockerfile inside.</p><pre>stage(&#39;Cloning Git&#39;) {<br>  steps {<br>    git &#39;https://github.com/gustavoapolinario/microservices-node-example-todo-frontend.git&#39;<br>  }<br>}</pre><p>The pipeline must be (but using your environment):</p><pre>pipeline {<br>  environment {<br>    registry = &quot;gustavoapolinario/docker-test&quot;<br>    registryCredential = ‘dockerhub’<br>  }<br>  agent any<br>  stages {<br>    stage(&#39;Cloning Git&#39;) {<br>      steps {<br>        git &#39;https://github.com/gustavoapolinario/microservices-node-example-todo-frontend.git&#39;<br>      }<br>    }<br>    stage(&#39;Building image&#39;) {<br>      steps{<br>        script {<br>          docker.build registry + &quot;:$BUILD_NUMBER&quot;<br>        }<br>      }<br>    }<br>  }<br>}</pre><p>Save and run it clicking on “Build Now”</p><p>The Stage view in jenkins job will change to this:</p><h3>Deploying the docker image to dockerhub</h3><p>At this moment, we clone a git and build a docker image.</p><p>We need put this image in docker registry to pull it in other machines.</p><p>First, create a environment to save docker image informations.</p><pre>dockerImage = &#39;&#39;</pre><p>Change the build stage to save build information in environment.</p><pre>dockerImage = docker.build registry + &quot;:$BUILD_NUMBER&quot;</pre><p>Ceate a new stage to push the docker image builded to dockerhub.</p><pre>stage(&#39;Deploy Image&#39;) {<br>  steps{</pre><pre>    script {<br>      docker.withRegistry( &#39;&#39;, registryCredential ) {<br>        dockerImage.push()<br>      }<br>    }<br>  }<br>}</pre><p>After build and deploy, delete the image to cleanup your server space.</p><pre>stage(&#39;Remove Unused docker image&#39;) {<br>  steps{<br>    sh &quot;docker rmi $registry:$BUILD_NUMBER&quot;<br>  }<br>}</pre><p>The final code will be (remember, using your environment):</p><pre>pipeline {<br>  environment {<br>    registry = &quot;gustavoapolinario/docker-test&quot;<br>    registryCredential = &#39;dockerhub&#39;<br>    dockerImage = &#39;&#39;<br>  }<br>  agent any<br>  stages {<br>    stage(&#39;Cloning Git&#39;) {<br>      steps {<br>        git &#39;https://github.com/gustavoapolinario/microservices-node-example-todo-frontend.git&#39;<br>      }<br>    }<br>    stage(&#39;Building image&#39;) {<br>      steps{<br>        script {<br>          dockerImage = docker.build registry + &quot;:$BUILD_NUMBER&quot;<br>        }<br>      }<br>    }<br>    stage(&#39;Deploy Image&#39;) {<br>      steps{<br>        script {<br>          docker.withRegistry( &#39;&#39;, registryCredential ) {<br>            dockerImage.push()<br>          }<br>        }<br>      }<br>    }<br>    stage(&#39;Remove Unused docker image&#39;) {<br>      steps{<br>        sh &quot;docker rmi $registry:$BUILD_NUMBER&quot;<br>      }<br>    }<br>  }<br>}</pre><p>Save and run it.</p><p>Awesome, the build is complete and the image will be send to docker registry.</p><h3>Complete pipeline to a node.js application</h3><p>This step is for who did this tutorial: <a href="https://medium.com/@gustavo.guss/jenkins-starting-with-pipeline-doing-a-node-js-test-72c6057b67d4">Jenkins Starting with Pipeline doing a Node.js test</a>.</p><p>To complete the node.js pipeline, let’s change this pipeline to merging with node.js build and test.</p><p>The complete pipeline will be:</p><pre>pipeline {<br>  environment {<br>    registry = &quot;gustavoapolinario/docker-test&quot;<br>    registryCredential = &#39;dockerhub&#39;<br>    dockerImage = &#39;&#39;<br>  }<br>  agent any<br>  tools {nodejs &quot;node&quot; }<br>  stages {<br>    stage(&#39;Cloning Git&#39;) {<br>      steps {<br>        git &#39;<a href="https://github.com/gustavoapolinario/node-todo-frontend">https://github.com/gustavoapolinario/node-todo-frontend</a>&#39;<br>      }<br>    }<br>    stage(&#39;Build&#39;) {<br>       steps {<br>         sh &#39;npm install&#39;<br>       }<br>    }<br>    stage(&#39;Test&#39;) {<br>      steps {<br>        sh &#39;npm test&#39;<br>      }<br>    }<br>    stage(&#39;Building image&#39;) {<br>      steps{<br>        script {<br>          dockerImage = docker.build registry + &quot;:$BUILD_NUMBER&quot;<br>        }<br>      }<br>    }<br>    stage(&#39;Deploy Image&#39;) {<br>      steps{<br>         script {<br>            docker.withRegistry( &#39;&#39;, registryCredential ) {<br>            dockerImage.push()<br>          }<br>        }<br>      }<br>    }<br>    stage(&#39;Remove Unused docker image&#39;) {<br>      steps{<br>        sh &quot;docker rmi $registry:$BUILD_NUMBER&quot;<br>      }<br>    }<br>  }<br>}</pre><p>Now you have a pipeline for test and create a docker image for your application.</p><p>Thanks.</p><p>— — — — — — — — — — — — — — —</p><p>A special thanks to <a href="https://medium.com/@cryptolukas">Matthias Döring</a>, who notify me about the lack of docker cleanup. It is necessary to your server don’t use all disc space. The docker images are usefull bexause they are cache to next build, but use a lot of disc space.</p><p><a href="https://medium.com/@cryptolukas/you-should-add-this-as-last-stage-or-post-task-d69fb384a361">https://medium.com/@cryptolukas/you-should-add-this-as-last-stage-or-post-task-d69fb384a361</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=64b84ea45ee9" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Jenkins Starting with Pipeline doing a Node.js test]]></title>
            <link>https://medium.com/@gustavo.guss/jenkins-starting-with-pipeline-doing-a-node-js-test-72c6057b67d4?source=rss-ff5458825300------2</link>
            <guid isPermaLink="false">https://medium.com/p/72c6057b67d4</guid>
            <category><![CDATA[jenkins]]></category>
            <category><![CDATA[pipeline]]></category>
            <category><![CDATA[test]]></category>
            <category><![CDATA[nodejs]]></category>
            <dc:creator><![CDATA[Gustavo Apolinario]]></dc:creator>
            <pubDate>Sat, 05 May 2018 14:27:38 GMT</pubDate>
            <atom:updated>2019-01-12T20:44:58.206Z</atom:updated>
            <content:encoded><![CDATA[<p>For this tutorial, you need jenkins installed. You can run in docker with this tutorial <a href="https://medium.com/@gustavo.guss/quick-tutorial-of-jenkins-b99d5f5889f2">https://medium.com/@gustavo.guss/quick-tutorial-of-jenkins-b99d5f5889f2</a>.</p><p>The pipeline is better because:</p><ul><li>you can reuse all things you did</li><li>you can put your build code inside project together with your code</li><li>you can version the job code</li><li>the change in pipeline is showed in “changes” inside job history</li></ul><p>All changes in git the job is started. With Jenkinsfile(file with pipeline script) inside your git project, all changes in pipeline or your project the job will start and the modification is logged by jenkins.</p><h3><strong>Installing Node.js tool</strong></h3><p>In home of jenkins, click in <strong>Manage Jenkins</strong>:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/256/1*_abJG78F2Bin8uHY3awFvA.png" /><figcaption>Jenkins menu</figcaption></figure><p>Click in <strong>Manage Plugins</strong>:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/287/1*xUDgaZpVO_tSACtV9RVx7w.png" /><figcaption>Manage Plugins</figcaption></figure><p>In Plugin manager, click on <strong>Available</strong> tab and after load the tab, search the plugins.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*b_3XQA_2FB5PfZMc7wWdTA.png" /><figcaption>Installation tabs</figcaption></figure><p>Search for <strong>nodejs</strong> and mark the checkbox.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/460/1*v99Fz6lbjALQdlaQ5iu3ew.png" /><figcaption>NodeJS plugin checked</figcaption></figure><p>Click on button “Download now and install after restart”.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/259/1*4DzY7JTYyV8yVYgZfgDNuw.png" /><figcaption>Download now and install after restart button</figcaption></figure><p>On next screen, mark the checkbox “Restart Jenkins when installation is complete and no jobs are running”.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/451/1*LRYN9NQzc9RjHbN2eBYldw.png" /><figcaption>Installating Plugins with Restart checked</figcaption></figure><p>Wait a moment, if the screen not change, go to jenkins home clicking in jenkins’s logo on top, in the left side of the site.</p><h3>Configuring Node.js tool</h3><p>After installed and restarted, go to jenkins’s home &gt; Manage Jenkins &gt; Global Tool Configuration.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/286/1*AJ2G20svwSJoEz5srNh38w.png" /><figcaption>Global Tool Configuration</figcaption></figure><p>Search for NodeJS and click on NodeJS instalation button.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/183/1*-46gPHZPcctEoNz8YWjPcA.png" /><figcaption>NodeJS Installations button</figcaption></figure><p>Put a name for node configuration, ex: <strong>node</strong>. Select the version of node that you need.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Jad75d1g7SCpADb7JFivow.png" /><figcaption>NodeJS config</figcaption></figure><h3>Test the nodejs plugin</h3><p>OK. NodeJS is installed with sucess. Let’s try it.</p><p>Go to jenkins’s homne, and click on <strong>New Item</strong> on jenkins’s menu.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/256/1*_abJG78F2Bin8uHY3awFvA.png" /><figcaption>Jenkins menu</figcaption></figure><p>Let’s create a job. Name it with <strong>build-test</strong> and select Pipeline. Click on “OK”.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/947/1*kALdHBEh1tkj5rLE-u2V3Q.png" /><figcaption>creating job</figcaption></figure><p>You will see this:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/462/1*5OfiQTHfGRC_o3aPizkLZA.png" /><figcaption>job tabs</figcaption></figure><p>In pipeline, past this code:</p><pre>pipeline {<br>  agent any<br> <br>  tools {nodejs &quot;node&quot;}<br> <br>  stages {<br>    stage(&#39;Example&#39;) {<br>      steps {<br>        sh &#39;npm config ls&#39;<br>      }<br>    }<br>  }<br>}</pre><p>The job will be like this:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/911/1*9mx6colZhKRUD54WjBm0rw.png" /><figcaption>Pipeline Script</figcaption></figure><h3>Pipeline explanation</h3><p>Before continue, let’s understand the pipeline job:</p><pre>agent any</pre><p>The job will run in any jenkins agent.</p><ul><li>You can have a lot of jenkins nodes, one master and some slaves, and the job will run in any node.</li><li>You can run the job on specific jenkins, ex: You have 3 jenkins with Linux and one with Windows. You can run this job only in jenkins slave with Windows.</li></ul><pre>tools {nodejs &quot;node&quot;}</pre><p>This line search for nodejs tool named “node” and use it in pipeline. It’s necessary for next scripts find the commands.</p><pre>stages {</pre><p>Stages is the inicialization from pipeline steps.</p><pre>stage(&#39;Example&#39;) {<br>  steps {<br>    ...<br>  }<br>}</pre><p>This commands start a new stage named “Example” and run the steps inside this stage.</p><pre>sh &#39;npm config ls&#39;</pre><p>It execute a sh script in machine. With this, we can test the npm running correctly.</p><h3>Running the test</h3><p>Now, let’s run the script. Save the job. Inside the job, in left menu, click on <strong>Build Now</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/190/1*0c8bTy4r2BWqHcLIanzSmw.png" /><figcaption>Jenkins Job menu</figcaption></figure><p>Wait some time for the build apear in <strong>build history</strong> below the menu (If necessary, reload the page).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/352/1*4dCFS84WZkEQYTna1oWfMA.png" /><figcaption>Build Histoy</figcaption></figure><p>After the build over, the ball can be red or blue. If the ball is blue, the job is builded with success.</p><p>In center of page, you can visualize the stage view.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/499/1*akRXri-UaAXJLu0sqJey8A.png" /><figcaption>Stage View</figcaption></figure><pre>Started by user Gustavo<br>Running in Durability level: MAX_SURVIVABILITY<br>[Pipeline] node<br>Running on Jenkins in /var/jenkins_home/workspace/build-test<br>[Pipeline] {<br>[Pipeline] stage<br>[Pipeline] { (Declarative: Tool Install)<br>[Pipeline] tool<br>[Pipeline] envVarsForTool<br>[Pipeline] }<br>[Pipeline] // stage<br>[Pipeline] withEnv<br>[Pipeline] {<br>[Pipeline] stage<br>[Pipeline] { (Example)<br>[Pipeline] tool<br>[Pipeline] envVarsForTool<br>[Pipeline] withEnv<br>[Pipeline] {<br>[Pipeline] sh<br>[build-test] Running shell script<br>+ npm config ls<br>; cli configs<br>metrics-registry = &quot;https://registry.npmjs.org/&quot;<br>scope = &quot;&quot;<br>user-agent = &quot;npm/5.6.0 node/v9.10.1 linux x64&quot;<br>; node bin location = /var/jenkins_home/tools/jenkins.plugins.nodejs.tools.NodeJSInstallation/node/bin/node<br>; cwd = /var/jenkins_home/workspace/build-test<br>; HOME = /var/jenkins_home<br>; &quot;npm config ls -l&quot; to show all defaults.<br>[Pipeline] }<br>[Pipeline] // withEnv<br>[Pipeline] }<br>[Pipeline] // stage<br>[Pipeline] }<br>[Pipeline] // withEnv<br>[Pipeline] }<br>[Pipeline] // node<br>[Pipeline] End of Pipeline<br>Finished: SUCCESS</pre><p>Ok. The build test right. Let’s create a real node job.</p><h3>Testing the application</h3><p>Go to jenkins’s home, click on “new job”. Select pipeline and create the job named <strong>“node_test”</strong>, and put this script:</p><pre>pipeline {<br>  agent any<br>    <br>  stages {    <br>    stage(&#39;Cloning Git&#39;) {<br>      steps {<br>        git &#39;<a href="https://github.com/gustavoapolinario/node-todo-frontend">https://github.com/gustavoapolinario/node-todo-frontend</a><a href="https://github.com/gustavoapolinario/microservices-node-example-todo-frontend.git&#39;">&#39;</a><br>      }<br>    }<br>  }     <br>}</pre><p>Now, in job screen. Click on “configure” and let’s change the code.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/359/1*417ij7NNgUisg3PBUJxQ1Q.png" /><figcaption>Stage View Git clone</figcaption></figure><p>Now, in job screen. click configure and let’s change the code.</p><pre>pipeline {<br>  agent any<br>    <br>  tools {nodejs &quot;node&quot;}<br>    <br>  stages {<br>        <br>    stage(&#39;Cloning Git&#39;) {<br>      steps {<br>        git &#39;<a href="https://github.com/gustavoapolinario/node-todo-frontend">https://github.com/gustavoapolinario/node-todo-frontend</a>&#39;<br>      }<br>    }<br>        <br>    stage(&#39;Install dependencies&#39;) {<br>      steps {<br>        sh &#39;npm install&#39;<br>      }<br>    }<br>     <br>    stage(&#39;Test&#39;) {<br>      steps {<br>         sh &#39;npm test&#39;<br>      }<br>    }      <br>  }<br>}</pre><p>After cloning step, we install the npm dependencies. Finally, the test is executed.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/751/1*6qusrRLG7AjlGF8EblaMiA.png" /><figcaption>Stage View with git, download dependneices and npm test</figcaption></figure><p>All right, the application is tested with success.</p><h3>Pipeline inside project</h3><p>Now, put the script of pipeline inside your git project in a file named Jenkinsfile.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/155/1*Pfpsx7M3rYMTBxIfgWrqtA.png" /><figcaption>Jenkinsfile inside git project</figcaption></figure><p>Go back to jenkins and change the job.</p><p>First step, change the definition of pipeline job to <strong>“Pipeline script from SCM”</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/914/1*j6bwpGWVBc4vWJZmYpuF4Q.png" /><figcaption>Pipeline script from SCM</figcaption></figure><p>Select <strong>Git</strong> on SCM Select.</p><p>Populate the field <strong>Repository URL with: “</strong><a href="https://github.com/gustavoapolinario/node-todo-frontend">https://github.com/gustavoapolinario/node-todo-frontend</a><strong>” </strong>and put in <strong>Script Path </strong>field:<strong> “</strong>Jenkinsfile_1<strong>”</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/854/1*HZ8gHXEnMVlo09qD3OMPWQ.png" /><figcaption>Build your pipeline from git repository</figcaption></figure><h3>Git credentials</h3><p>If you need credential to access your git repository, click on “Add” button.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/426/1*spnwbxRt2BpdCKu54-nxuQ.png" /><figcaption>Button Add git Credentials</figcaption></figure><p>Add your git credentials</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*P4m6xci1c1ZNw2NVDlwU7Q.png" /><figcaption>Add Credentials to git</figcaption></figure><p>And the configuration will be right with your credentials.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/736/1*qCwCb6YuIk_SxCqCyiSj9g.png" /></figure><p>We have the node project tested. Now we can build the docker container with our project.</p><h3>More</h3><p>To continue, you can learn how to build docker image, send to registry after test your node.js pipeline. See the next tutorial: <a href="https://medium.com/@gustavo.guss/jenkins-building-docker-image-and-sending-to-registry-64b84ea45ee9">Jenkins Building Docker Image and Sending to Registry</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=72c6057b67d4" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Jenkins and Slack Integration]]></title>
            <link>https://medium.com/@gustavo.guss/jenkins-and-slack-integration-fbb031cd7895?source=rss-ff5458825300------2</link>
            <guid isPermaLink="false">https://medium.com/p/fbb031cd7895</guid>
            <category><![CDATA[pipeline]]></category>
            <category><![CDATA[jenkins]]></category>
            <category><![CDATA[slack]]></category>
            <dc:creator><![CDATA[Gustavo Apolinario]]></dc:creator>
            <pubDate>Tue, 01 May 2018 22:37:21 GMT</pubDate>
            <atom:updated>2018-05-14T00:15:46.448Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/600/1*w-oZAGaHtt--fdjAcEMo0Q.jpeg" /></figure><p>Slack is a chat software. Slack has hook’s to provide communication from your tools to your team.</p><p>Jenkins can send notification from all your jobs to your team. It can use channels to send especific notification for specific teams.</p><h3>Create Slack Account</h3><p>First, create your slack account if you don’t have yet.</p><p>Access <a href="https://slack.com/">Slack.com</a>.</p><p>To Jenkins access slack, you need install the jenkins app.</p><p>Go to your slack and click on “+” (see image below)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/248/0*VN_1fUVlAm5G7qsU.png" /></figure><p>Seach for “Jenkins” and click on “install” button</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/637/0*Q1eU1cImsgAvUrnM.png" /></figure><p>You will be send to Jenkins app page. Click “Install” again</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*8iyzJcT1f7d8Dinc.png" /></figure><p>Select the Channel for Jenkins post message or create a new channel.</p><p>For this tutorial, create a channel named “jenkins”.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/966/0*RcZwTAbiR4PCOdnI.png" /></figure><p>Right, Slack is configured and show you a tutorial of how to configure jenkins.</p><p>Follow the Slack tutorial.</p><h3>Install “Slack Notification” plugin in jenkins</h3><p>Go to Manage Jenkins &gt; Available tab search for “Slack Notification”. Install it and restart jenkins.</p><h3>Configuring Slack plugin</h3><p>Go to Manage Jenkins &gt; Configure System. Find “Global Slack Notifier Settings” in this page and populate with your slack information.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*eT6I2mVm7kqJ8-8L.png" /></figure><p>After configured click on “Test Connection” button and a new message will be received in slack.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*AYr-fuqeHNqMINrz.png" /></figure><h3>Slack test message</h3><p>Create a new job in jenkins named “slack-test” and put this pipeline script:</p><pre>pipeline {<br>  agent any</pre><pre>  stages {<br>    stage(&#39;Slack Message&#39;) {<br>      steps {<br>        slackSend channel: &#39;#jenkins&#39;,<br>            color: &#39;good&#39;,<br>            message: &quot;*${currentBuild.currentResult}:* Job ${env.JOB_NAME} build ${env.BUILD_NUMBER}\n More info at: ${env.BUILD_URL}&quot;<br>      }<br>    }<br>  }<br>}</pre><p>This script will send to channel ‘jenkins’ a message with color named ‘good’ (green). This message will contain the Job result (SUCCESS/FAILURE), the name of the job, the build number and a link to see the build information.</p><p>Run the job and you will receive a new message in slack.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/420/0*r_yJguIFaaGPYCd9.png" /></figure><h3>Add User in message</h3><p>To add the user who run the build inside the message, you need create a function with the pipeline.</p><pre>def getBuildUser() {<br>  return currentBuild.rawBuild.getCause(Cause.UserIdCause).getUserId()<br>}</pre><p>Create a new environment for pipeline</p><pre>environment {<br>  BUILD_USER = &#39;&#39;<br>}</pre><p>Set the environment with the function return.</p><pre>script {<br>  BUILD_USER = getBuildUser()<br>}</pre><p>Change the message to contain the new information.</p><p>The new pipeline is.</p><pre>def getBuildUser() {<br>  return currentBuild.rawBuild.getCause(Cause.UserIdCause).getUserId()<br>}<br>pipeline {<br>  environment {<br>    BUILD_USER = &#39;&#39;<br>  }<br>  agent any</pre><pre>  stages {<br>    stage(&#39;Slack Message&#39;) {<br>      steps {<br>        script {<br>          BUILD_USER = getBuildUser()<br>        }<br>        slackSend channel: &#39;#jenkins&#39;,<br>            color: &#39;good&#39;,<br>            message: &quot;*${currentBuild.currentResult}:* Job ${env.JOB_NAME} build ${env.BUILD_NUMBER} by ${BUILD_USER}\n More info at: ${env.BUILD_URL}&quot;<br>      }<br>    }<br>  }<br>}</pre><p>Before run, you need remove the checkbox “Use Groovy Sandbox” below pipeline.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/943/0*H1hj9We09VTDSA-V.png" /></figure><p>Run and see the new message, now with user information.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/413/0*fQ5XxuLH-MpskaQJ.png" /></figure><p>Let’s create a new pipeline. This pipeline will send the notification with colors based on status.</p><p>First, create a array of colors based on jenkins job status.</p><pre>def COLOR_MAP = [&#39;SUCCESS&#39;: &#39;good&#39;, &#39;FAILURE&#39;: &#39;danger&#39;, &#39;UNSTABLE&#39;: &#39;danger&#39;, &#39;ABORTED&#39;: &#39;danger&#39;]</pre><p>Now, the color parameter is:</p><pre>color: COLOR_MAP[currentBuild.currentResult]</pre><p>To run the slack notification in job failure or success, use post build.</p><p>You can learn more about post build on <a href="https://condevops.firebaseapp.com/post/how-to-do-post-build-in-jenkinsp-ipeline/">How to do Post Build in Jenkins Pipeline</a></p><p>The entire new pipeline:</p><pre>def COLOR_MAP = [&#39;SUCCESS&#39;: &#39;good&#39;, &#39;FAILURE&#39;: &#39;danger&#39;, &#39;UNSTABLE&#39;: &#39;danger&#39;, &#39;ABORTED&#39;: &#39;danger&#39;]</pre><pre>def getBuildUser() {<br>  return currentBuild.rawBuild.getCause(Cause.UserIdCause).getUserId()<br>}</pre><pre>pipeline {<br>  environment {<br>    //This variable need be tested as string<br>    doError = &#39;1&#39;<br>    BUILD_USER = &#39;&#39;<br>  }</pre><pre>  agent any<br>  stages {<br>    stage(&#39;Error&#39;) {<br>      when {<br>        expression { doError == &#39;1&#39; }<br>      }<br>      steps {<br>        echo &quot;Failure&quot;<br>        error &quot;failure test. It&#39;s work&quot;<br>      }<br>    }</pre><pre>    stage(&#39;Success&#39;) {<br>      when {<br>        expression { doError == &#39;0&#39; }<br>      }<br>      steps {<br>        echo &quot;ok&quot;<br>      }<br>    }<br>  }<br>  post {<br>    always {<br>      script {<br>        BUILD_USER = getBuildUser()<br>      }<br>      echo &#39;I will always say Hello again!&#39;</pre><pre>      slackSend channel: &#39;#jenkins&#39;,<br>          color: COLOR_MAP[currentBuild.currentResult],<br>          message: &quot;*${currentBuild.currentResult}:* Job ${env.JOB_NAME} build ${env.BUILD_NUMBER} by ${BUILD_USER}\n More info at: ${env.BUILD_URL}&quot;<br>    }<br>  }<br>}</pre><p>Test your job changing the environment “doError” from ‘1’ to ‘0’.</p><p>The new slack message:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/508/0*bL7bQR8pk3fpFk8T.png" /></figure><p>Thanks.</p><p><a href="https://jenkins.io/doc/pipeline/steps/slack/">Slack Notification Plugin</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=fbb031cd7895" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Quick start with jenkins in docker]]></title>
            <link>https://medium.com/@gustavo.guss/quick-tutorial-of-jenkins-b99d5f5889f2?source=rss-ff5458825300------2</link>
            <guid isPermaLink="false">https://medium.com/p/b99d5f5889f2</guid>
            <category><![CDATA[blue-ocean]]></category>
            <category><![CDATA[pipeline]]></category>
            <category><![CDATA[docker]]></category>
            <category><![CDATA[jenkins]]></category>
            <dc:creator><![CDATA[Gustavo Apolinario]]></dc:creator>
            <pubDate>Fri, 09 Mar 2018 00:09:38 GMT</pubDate>
            <atom:updated>2018-12-10T08:53:39.943Z</atom:updated>
            <content:encoded><![CDATA[<p>What’s Jenkins? Jenkins is a automation tool. With him, you can create jobs to build, test and deploy your application.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/347/1*mMf0g9ZkI7JSSl7jyX6pZA.jpeg" /></figure><p>You can create your pipelines in jenkins. But whats’s pipeline? Pipeline is a script step by step of all things you need to do. Example: you will create a pipeline to build your code. First step is checkout your git code, after this you need test, build, package, create a docker image and finaly, deploy your code.</p><p>For fist steps with jenkins, let’s create a container in your machine.</p><p>You need docker installed and running in your machine.</p><p>Execute this command:</p><pre>docker run --name jenkinsci -p 8080:8080 jenkins/jenkins:lts</pre><p>This command will download and run a jenkins in your machine.</p><p>Wait some time, The console will show a lot of messages. When jenkins was inicialized, the console will show you a admin password to start jenkins initial setup. The text with password is:</p><pre>*************************************************************<br>*************************************************************<br>*************************************************************</pre><pre>Jenkins initial setup is required. An admin user has been created and a password generated.<br>Please use the following password to proceed to installation:<br>a3c76c0cc3e541ff94b3670c22995342<br>This may also be found at: /var/jenkins_home/secrets/initialAdminPassword</pre><pre>*************************************************************<br>*************************************************************<br>*************************************************************</pre><p>You can access your jenkins in <a href="http://localhost:8080/">http://localhost:8080/</a>. You will see this screen:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1010/1*k3KTnBsctKJWtDVgmZHSlQ.png" /></figure><p>Put the admin password in input on the screen and press continue.</p><p>In next screen, click “Install suggested plugins”</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1016/1*NrDjcmDZV4cSn0jtFOqzSQ.png" /></figure><p>Wait the plugns instalations</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1012/1*NBrV4NHGoP1afXmkh7CcXA.png" /></figure><p>Now, create a user for you.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1013/1*_epvlpFLMglSIqrPPtZAOg.png" /></figure><p>We finish the instalation, click “Get start using Jenkins”</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1009/1*mcjZbc3Ets7rBWhGFlcxJQ.png" /></figure><p>Let’s install two plugins:</p><ul><li>blueocean plugin to beautify your jenkins. This plugin better the usability of jenkins and focus in pipelines scripts.</li><li>locale plugin to jenkins always show english text. You don’t need install this, but i suggest install to search errors directly in english.</li></ul><p>Go to Plugin Manager again and search for locale</p><p>To install plugins:<br>- In home of jenkins, click in <strong>Manage Jenkins</strong>:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/273/1*KwqxATyp77zKxIQnShBFgw.png" /></figure><p>Click in <strong>Manage Plugins</strong>:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/287/1*xUDgaZpVO_tSACtV9RVx7w.png" /></figure><p>In Plugin manager, you need click in <strong>Available</strong> tab and after load the tab, search the plugins</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*b_3XQA_2FB5PfZMc7wWdTA.png" /></figure><p>Search for <strong>locale</strong>, mark the checkbox and click in install button.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/418/1*aAtHELPEEaCyGSQb29-K9Q.png" /></figure><p>After install locale, go to Home &gt; Manage Jenkins &gt; Configure System</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/308/1*323bnPMkzjKAR8SLJGeyqw.png" /></figure><p>Search for locale. Input “<strong>en” </strong>in “<strong>Default language” </strong>and check<strong> “ignore browser preference and force this language to all users”</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*rJQMDETLff7_qJpyA5kuug.png" /></figure><p>Locale Plugin installed and configured, lets install Blue ocean.<br>Back to jenkins home &gt; Manage jenkins &gt;Manage Plugins. In Available tab search for blueocean and install it.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/274/1*puAVu7UbhFwBDD3HMzmNUg.png" /></figure><p>All done. But you see the visual without blue ocean plugin, let’s use it.<br>In Jenkins home, Click in “<strong>Open Blue Ocean</strong>” (left menu)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/256/1*_abJG78F2Bin8uHY3awFvA.png" /></figure><p>Now, you will see a screen like this:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*6rKdeQLRne5LTZ1eXIuZhw.png" /></figure><p>All Right, now we have jenkins installed and we are using blue ocean plugin to have a better experience in your pipelines.</p><p>The next steps is create a pipeline to build some things for us.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b99d5f5889f2" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>