Jenkins- An Automation Tool

shristi sharma
6 min readMar 12, 2021

--

Jenkins is an open-source automation tool written in Java with plugins built for Continuous Integration purposes. Jenkins is used to build and test your software projects continuously making it easier for developers to integrate changes to the project, and making it easier for users to obtain a fresh build. It also allows you to continuously deliver your software by integrating with a large number of testing and deployment technologies.

Work Cycle of jenkins

Each phase is monitored and allows you to stop the entire process and the change will be reported to the user by Jenkins. In large companies, it is common for multiple teams to work on the same project without knowing what the other teams are doing on the same code base. Those changes can create bugs that will only be revealed when both codes are integrated into the same branch. Since Jenkins can run its predefined jobs for every commit, it will be able to detect and notify developers that something is not right and where it is. Thousands of plugins can be integrated with Jenkins, they provide support for different types of build, version control systems, automation, and more. It can be installed through native system packages, Docker, or be run by any machine with a Java environment installed.

Advantages of using Jenkins

  • It is an open-source tool with great community support.
  • It is easy to install.
  • It has 1000+ plugins to ease your work. If a plugin does not exist, you can code it and share it with the community.
  • It is free of cost.
  • It is built with Java and hence, it is portable to all the major platform.
  • It is used in organization ,companies so that their daily task can be automated easily.
  • It is used to make software development cycle easy by reducing the stages in the cycle and integrating CI/CD pipelines.

Need Of Jenkins

Over time, Jenkins, like most other self-hosted CI/CD tools, tends to accumulate a vast number of jobs. Having a lot of them causes quite an increase in maintenance cost. Maintaining ten jobs is easy. It becomes a bit harder (but still bearable) to manage a hundred. When the number of jobs increases to hundreds or even thousands, managing them becomes very tedious and time demanding.

If you are not proficient with Jenkins (or other CI/CD tools) or you do not work for a big project, you might think that hundreds of jobs is excessive. The truth is that such a number is reached over a relatively short period when teams are practicing continuous delivery or deployment. Let’s say that an average CD flow has the following set of tasks that should be run on each commit: building, pre-deployment testing, deployment to a staging environment, post-deployment testing and deployment to production. That’s five groups of tasks that are often divided into, at least, five separate Jenkins jobs. In reality, there are often more than five jobs for a single CD flow, but let us keep it an optimistic estimate. How many different CD flows does a medium sized company have? With twenty, we are already reaching a three digits number. That’s quite a lot of jobs to cope with even though the estimates we used are too optimistic for all but the smallest entities.

Now, imagine that we need to change all those jobs from, let’s say, Maven to Gradle. We can choose to start modifying them through the Jenkins UI, but that takes too much time. We can apply changes directly to Jenkins XML files that represent those jobs but that is too complicated and error prone. Besides, unless we write a script that will do the modifications for us, we would probably not save much time with this approach. There are quite a few plugins that can help us to apply changes to multiple jobs at once, but none of them is truly successful (at least among free plugins). They all suffer from one deficiency or another. The problem is not whether we have the tools to perform massive changes to our jobs, but whether jobs are defined in a way that they can be easily maintained.

Prerequisite To Install Jenkin

👉We need to have install java software on top of the operating system

👉Download jenkins software from official website of jenkins and install the software according to the operating system you are using like windows ,mac ,Linux

Note👉 Jenkins released new software update every week so it is good to use stable version of jenkins that is bug free because in new patches there are chances that it might conflict

Installation Part Of Jenkins

See the image to know how we can install Rhel8 on our Rhel8 vm

First of download two software for installation one is java and other is Jenkins from the official website.

Second copy that software in your Vm where you need to run your jenkins\

Using rpm -ivh jdk, rpm -ivh jenkins install the software.

Restart Jenkins and also check status Of Jenkins

After that check your IP using ifconfig enpos3 .Go to the browser type there IP:PORT NO

You will be redirected to Jenkins page there option come of unlock Jenkins there we need to put out password .

For generating Your password you need to go to your Vm and type one Url that is shown on your Unlock Jenkins screen. You will get your password

Note- Password is sensitive you dont need to show that

Copy the password and paste it into the Unlock Jenkins screen

Paste the password that is generated
start using Jenkins

You are redirected to Jenkins Dashboard .

You can set your username and Password after login into the dashboard.

Note👉 Don't close the window before setting your password otherwise it can create trouble

Which Companies Are Using Jenkins👉

Nearly about 2833 companies reportedly use Jenkins in their tech stacks, including Facebook, Netflix, and Udemy and many more.

Case Study: Tymit

Challenge:

Create a solidly reliable CI/CD platform that provides the technology team with the agility and the flexibility needed to innovate while ensuring the security and scalability their fintech service requires.

Solution:

Tymit, a revolutionary credit card processing company, leveraged Jenkins to build a compliant, transparent and secure modern DevOps platform to drive product innovation, handle instant financial transactions and support thousands of users in real-time.

Results:

  • faster delivery of mobile, microservices and operational services
  • reduced software testing and release cycles by 50%
  • ability to support thousands of users for real-time transactions
  • created a secure, controlled and compliant fintech environment.

Comparison between Before & After Jenkins

Thank you

By -shristi sharma

--

--

shristi sharma
shristi sharma

Written by shristi sharma

Aspiring Devops Enthusiastic |Content Creator |Python | Machine Learning | Cloud Computing

No responses yet