Industry Use Cases of Jenkins

Sourabhmiraje
6 min readMar 15, 2021

Hello folks,

Today we are going to talk about a very popular CI/CD tool. yes, it’s JENKINS.

As we know in this agile world how important it is to deploy and develop the application quickly. When it comes to development of application, integration with various tools are inevitable, but doing manually is very hectic and not so reliable.

So to tackle this challenge a new technology was developed named JENKINS.

History

The Jenkins project was originally named Hudson, and was renamed after a dispute with Oracle. on January 11, 2011, a call for votes was made to change the project name from “Hudson” to “Jenkins.” The proposal was overwhelmingly approved by community vote on January 29, 2011, creating the Jenkins project.

Kohsuke Kawaguchi received an O’Reilly Open Source Award for his work on the Hudson/Jenkins project.

I know, I know now you are more excited to know what is Jenkins exactly.

So let me jump to the topic directly,

What is Jenkins ?

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.

With Jenkins, organizations can accelerate the software development process through automation. Jenkins integrates development life-cycle processes of all kinds, including build, document, test, package, stage, deploy, static analysis, and much more.

Architecture Of Jenkins

  • Developers do the necessary modifications in the source code and commit the changes to the repository. A new version of that file will be created in the version control system that is used for maintaining the repository of source code.
  • The repository is continuously checked by Jenkins CI server for any changes (either in the form of code or libraries) and changes are pulled by the server.
  • In the next step, we ensure that the build with the ‘pulled changes’ is going through or not. The Build server performs a build with the code and an executable is generated if the build process is successful. In case of a build failure, an automated email with a link to build logs and other build artifacts is sent to the developer.
  • n case of a successful build, the built application (or executable) is deployed to the test server. This step helps in realizing continuous testing where the newly built executable goes through a series of automated tests. Developers are alerted in case the changes have caused any breakage in functionality.
  • If there are no build, integration, and testing issues with the checked-in code, the changes and tested application are automatically deployed to the Prod/Production server.

Jenkins Architecture Diagram:

A single Jenkins server might not be sufficient to handle the load that comes with large-scale software projects.

so its preferred to create Master-Slave architecture

Master- SlaveArchitecture In Jenkins

Jenkins Master

The main server in Jenkins is the Master. Here are the jobs handled by Jenkins Master:

  • Schedule build jobs
  • Choosing the appropriate slave in the master-agent ecosystem for dispatching the builds.
  • Monitor slaves and take them online/offline as and when required.
  • Presenting the build results (and reports) to the developer.

Jenkins Slave(s)

A slave or agent is a remote machine that is connected to the Master. Depending on the project and build requirements, you could opt for ’N’ number of slaves. slaves can run on different operating systems and depending on the ‘type of build request’, the appropriate slave is chosen by the Master for build execution and testing.

Here are the jobs handled by the Jenkins Slave(s):

  • Listen to commands from the Jenkins Master.
  • Execute build jobs that are dispatched by the Master.
  • Developers have the flexibility to run the build and execute tests on a particular agent or a particular type of Slave. The default option is Jenkins Master selecting the best-suited Slave for the job.

How does it Works ?

  • Developers check-in their respective code changes in ‘The Remote Source Code Repository’ that is depicted on the left-hand side.
  • Only the Jenkins master is connected to the repository and it checks for code-changes (in the repository) at periodic intervals. All the Jenkins Slaves are connected to the Jenkins Master.
  • Jenkins master dispatches the request (for build and test) to the appropriate Jenkins slave depending on the environment required for performing the build. This lets you perform builds and execute tests in different environments across the entire architecture.
  • The slave performs the testing, generates test reports, and sends the same to the Jenkins Master for monitoring.

As developers keep pushing code, Jenkins Slaves can run different builds versions of the code for different platforms. Jenkins Master (or Master Node) controls how the respective builds should operate.

Advantages of Jenkins include:

  • 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 platforms.

Now you got a brief idea about What, How and Why…!!!

now lets see a small case study about Preply

Jenkins Case Study: Preply

Preply is an online educational platform which helps over 1,00,000 students to find private language tutors based on their profiles.

To support this online education platform — and over 100,000 students and 25,000 tutors Preply’s engineering team set out to create a fully automated CI/CD process for its software and development projects.

CHALLENGE:

Maintain their ‘everything as code’ mantra and enhance their current Jenkins installation. Eliminate manual intervention by using a configuration-as-a-code only solution for all software development.

SOLUTION: A flexible and scalable CI/CD pipeline that enables their team to introduce and accelerate the deployment of new builds without jeopardizing the entire service.

RESULTS:

  • Daily release rate increased from 1 to 40 and continue growing
  • Rollback time decreased from 45 minutes to 60–120 seconds
  • Deployment time reduced from 90 to 5–40 minutes (depending on service)
  • Vastly improved conversion and user experience

I hope now you are clear with the usefulness of Jenkins and how it is becoming so popular day by day.

Do let me know about your view on article in the comment box and do clap if you find it helpful.

Contact me on my LinkedIn profile.

--

--