Posts

Jenkins Seed Job using DSL Script to Generate Job

Image
 Hey Guys!! How are you? In this learning post I would like to share with you awesome Jenkins feature experiment -  Infrastructure as a Code (IaC). The entire Jenkins Job or Project can be configured manually step-by-step in the regular fashion, when you click on the "new item" on the Jenkins Dashboard to create a project. But here story is different - with DSL script you could do the same thing that is dynamically creating a Job with a single flexible scalable durable way with Groovy script.  Jenkins DSL Groovy script generating dynamic Job Groovy is more like Shell scripting but totally executable on Java Virtual Machine. Those who know Java it will be easy to understand the Groovy syntax and its blocks. If you don't then no worries we will be coming up with easy to use DSL script in the following sections. Prerequisite for DSL Job creation Jenkins master-slave installed up and running. SCM installed/github Up and running Jenkins must have plugins installed such as ...

Jenkins Continuous Delivery

Image
👋 Warm Welcome 🤗 to my dear DevOps DevSecOps /SRE engineers here in this post we will exploring about Jenkins configured to run a full fledged CI/CD flow. Preparation for CI/CD The full length end-to-end automation can be done with the Jenkins Jobs. We need to identify how the dependencies forms the Job chain, what job become upstream and what all jobs can be downstream to which job also you need to plan as per your project needs. Here I'm taking the scenario where Java based web application package and deployment to different environments such as QA, Staging and for Production with approval to run the Build. The sequence of steps involved in this process are: Install Tomcat server  Using Jenkins CICD job deploy  Install Tomcat Server on a VM/Cloud instance Here the VM/Cloud instance assuming as Ubuntu Linux machine. d Step 1: Install JRE/Java To install Tomcat on any Platform there should be JRE available. To have JRE we do install JDK which is suitable to the Tomca...

How to Integrate JFrog Artifactory with Jenkins on Ubuntu

Image
 Hello Dear DevOps/DevSecOps engineers and automation team members. Today we will experiment on JFrog Artifactory integration with Jenkins. Step-by-step guide to setting up JFrog Artifactory and integrating it with Jenkins for efficient CI/CD pipelines. To do this we need to break down the task into two phases in the first phase we will do JFrog Artifactory setup. after that next phase we will do integrate it in Jenkins. Prerequisites for Integration Minimum requirement to run the JFrog artifactory we need 4Core CPU, 8 GB of RAM system configuration Virtual Boxes or VM instance on the Cloud is the basic requirements. On the AWS Cloud: An AWS   t2.small  EC2 instance (Linux) if other cloud please select at least 2GB RAM providing instance. Open port 8081 and 8082 in the  Security Grou p=> Inbound or on the firewall allow ports. Vagrant boxes for Jenkins and jfrog artifactory On premises setup using Vagrant # Ubuntu boxes for Jenkins and Jfrog Vagrant.configur...

Jenkins installation on Windows

Image
 Hello DevOps Guys, We will install the Jenkins Controller on the Windows machine.  How to install Jenkins on Windows machine? Here in this post we will explore Step-by-Step installation instructions for Jenkins on Windows platform. Jenkins installation on Windows Step 1: Install and set Java Please visit the Oracle Java SE download page:  http://www.oracle.com/technetwork/java/javase/downloads/index.html . Oracle providing the new option on the download page, that is "JDK Script Friendly URLs" page. Choose the JDK for your operating system (Windows 10 or 11) 64bit to download. Double click downloaded file launches installer wizard, proceed with the agree and set up the installation location as per your disk/drive availability. Verification of Java installation  Open a CMD prompt run "java -version" if Java installed correctly in the PATH you will get the installed version as output. if not set the PATH from the type ENVIRONMENT VARAIABLES search ->EDIT ENVIRONME...

Git Stashing

Image
Hello DevOps/DevSecOps team Guys!! As you know we are learners always shine with 'Learning by doing'. In this post exploring the git stashing it's nice to know how you can keep code in safer for reuse after sometime or after some other code commits getting back.   What is Git Stash means? Stashing takes the dirty state of your working directory — that is, your modified tracked files and staged changes — and saves it on a stack of unfinished changes that you can reapply at any time (even on a different branch). To demonstrate stashing, you should go into your project and start working on a couple of file(s) and possibly stage one of the changes. Power of git stash Why do we need git stashing? We have already git commit command right then why stashing? You can commit your code and switch to another branch. Your actual work is in a "messy state" and there are still more new feature changes need to be done on the projects coming up and don't want ...

Git Merge Rebase and Cherry Pick - deep dive

Image
Hello guys 🙂 this post I would like to share with you about the " git merge " experiments. We have multiple code lines in the project, once the developer completes his task branch is ready to move to the next branch for testing.  Git Merge and git rebase There are multiple ways to combine the code lines. If the HEAD pointed to the tip of the branch then the best way to merge from the other branches into the current branch.  FF fast forward merge  3 Way merge You will be on the target-branch (most of the time it will be main/master or release or production) and then you will run the following command with a source-branch. git merge [branch-name] The following example for the Git Merge 'ort' Strategy, let's begin clear mkdir merge_test; cd merge_test; git init # on main branch two commits touch test1 ; git add . ; git commit -m "test1" touch test2 ; git add . ; git commit -m "test2" # branch out feature and do 2 commits git chec...

GIT Commands reference for DevOps Engineer

Image
Dear DevOps Engineer!! this post is full of experimenting with git commands running most of them on the 'Git Bash' window in my laptop. I've collected three things about each git command. git command syntax What this git command will do - short descriptions An example command that I've executed Screenshot of that command execution How do I Start a Fresh repository in Git CLI(local repo)? You need to create a folder where you would like to start your coding project. The code can be web-site related where you can have multiple directories involved such as HTML files into a folder, all images to be used in the website in a folder, CSS files into a folder, etc. First, make the folder structure for you project then at the root of the project need to initialize the project.  To create empty repo or re-initializing a repo How to start a project repo in Git? The `git init` command initiates the project in git cli. Syntax : git init Note: It is a...