Jenkins Use-cases

Anupam Kumar Thakur
5 min readMar 12, 2021

What is Jenkins?

Jenkins is an open-source automation tool that helps the developers to develop code, test it and deploy the software with automation. Automation pushed the manual processes of software development and testing. It is written in Java and works on the concept of CI/CD Continuous Integration and Continuous Development. It is also called an integration tool. It integrates so many development and testing technologies and it is treated as the core of the DevOps technologies. For the integration of different technologies, it has many plugins that can be installed. Eg, GitHub plugin, AWS EC2 plugin, etc.

Why do we use Jenkins?

It is really very very tough for the developers and testers to do the same thing again and again. Developers work on different technologies simultaneously. So, during the creation of any software, a developer make many commits in the source code. It mnay be 100 commits a day. So, if they need to integrate the technologies 100 times during its development then it will be difficult to do the same thing manually again and again. Jenkins integrates all the see technologies together and developers just once configure it and then Jenkins automatically keeps checking the changes made in the code each time and, it reflects the changes on the other integrated part on which the software is working. This feature consists of Continuous Integration and Contiuous Developement. Continuous deployement means to deploy the new source code with new commits.

How to use Jenkins?

Follow the below steps to install Jenkins:

STEP 1: Download the Java JDK software “jdk-8u281-linux-x64.rpm” and the Jenkins software “jenkins-2.282–1.1.noarch.rpm”.

STEP 2: If this software is at windows then copy these to the Linux machine using WinSCP software.

STEP 3: Using the command “rpm -ivh jdk-8u281-linux-x64.rpm” and “rpm -ivh jenkins-2.282–1.1.noarch.rpm” both of this software can be installed. We must remember that first, we need to install Java JDK then Jenkins.

STEP 4: “java -version” and “rpm -q jenkins” can be used to check whether both the software got installed or not.

STEP 5: netstat -tnlp | grep java” this command will show, which port java is using now, and “ifconfig enp0s3” will tell about the IP of the current Linux machine. So, IP_address: Port_no (Eg. 192.168.43.154:8080) will give us the Jenkins login page. There we will get an address, we need to use this address with the cat command “cat file_address”. It will give a password for authentication and for login for the first time.

What are Jenkins plugins?

Jenkins has more than 1000 plugins available for the development, testing, and deployment of the code. Plugins are provided to use the feature of different individual tools. Developers install the plugins as per their need. For example, the developers need to integrate Jenkins with GitHub and Docker. So, they will install two plugins one for GitHub and one for Docker, after that they will do some configuration to integrate GitHub and Docker with Jenkins. These plugins help in creating pipelines for the jobs. Few plugin examples are Git plugin, GitHub plugin, Docker plugin, Amazon EC2 plugin, etc.

Use-cases of Jenkins

Continuous integration: CI stands for continuous integration. This tool can integrate with few popular technologies that support DevOps technology. Android, Bitbucket Server, C/C++, Docker, Embedded, GitHub, Java, PHP, etc are few technologies that are integrated with Jenkins. Continuous integration is the practice of merging all developers’ working copies to shared mainline several times a day. Jenkins just downloads the updated file and integrates that with the previous one.

Continuous delivery: Continuous delivery is a software engineering approach in which teams produce software in short cycles, ensuring that the software can be reliably released at any time and, when releasing the software, doing so manually. It aims at building, testing, and releasing software with greater speed and frequency. Continuous delivery is “code changes are automatically built, tested, and prepared for a release to production”. To send the newly integrated code that is already tested.

Continuous Deployment: Continuous deployment is to deploy the newly created version. It is done after the two processes development and testing have been completed. Continuous deployment is a strategy for software releases wherein any code commit that passes the automated testing phase is automatically released into the production environment, making changes that are visible to the software’s users.

Automation: It is the process for which Jenkins is used and quite popular these days. We just need to install the plugins according to the need. Then, need to do a small configuration. If any changes will make in the code from GitHub the automation will automatically do this work. Because automation does the work of Integration, delivery, and deployment we don’t need to tell them.

Case study

The topmost companies including Facebook, Netflix, Udemy, AWS, LinkedIn, Google, Nokia, etc use Jenkins for automation.

Netflix: Netflix has many Jenkins server on AWS that helps to track the GitHub repository if any changes made int he software and much more automation task. A Jenkins job is configured to invoke Nebula to build, test, and package the application code.

Nokia: Previously Nokia was working on the concept of Nightly builds for the development of the software. It means just every night the code was tested on the new environment or OS. After the Jenkins came the testing was kept doing in each next moment. If any changes occur it make changes on the integrated part so that automation can be achieved and the process of software development gets more efficient.

References:

  1. https://www.jenkins.io/
  2. https://en.wikipedia.org/wiki/Jenkins_(software)

Hope you enjoyed it. THANK YOU!!!!

--

--

Anupam Kumar Thakur

AWS | DOCKER | ANSIBLE | KUBERNETES | JENKINS | MACHINE LEARNING | DEEP LEARNING | REDHAT