Free Shipping

Secure Payment

easy returns

24/7 support

  • Home
  • Blog
  • What is Jenkins? | Jenkins for continuous integration

What is Jenkins? | Jenkins for continuous integration

 July 20  | 0 Comments

In this blog, you will be exploring the working architecture of Jenkins and role of Jenkins in the software development life cycle.

Before moving to Jenkins we will recommend you to please go through the blogs which will help you to understand what is DevOps and most popular DevOps tools with the installation.

What You Will Learn :

Jenkins

  • What is Jenkins?
  • What is Continuous Integration (CI)?
  • Why Continuous Delivery (CD).
  • Why We Need CI/CD With Realtime Example.
  • What is Continuous Delivery Pipeline?
  • Stages Of Continuous Delivery Pipeline.
  • Advantages Of Continuous Delivery

Realtime Case Studies

  • Continuous Integration and Continuous Delivery at HP.
  • Continuous Integration At AcadGild.

What is Jenkins?

Jenkins is a powerful automation tool written in Java, also a continuous integration server designed to handle any type of build or continuous integration processes. It can be used by teams with different sizes on those projects where the teams may be working with any heterogeneous languages like Java, .net, PHP, etc.

What makes Jenkins an ideal choice for continuous integration?

Junkins got wonderful plugins that allow connecting all software development tools which is used in code, test and deployment phases. That is what makes Jenkins very powerful.

From the continuous integration perspective, Jenkins can connect to various source code servers and it has also got plugins to allow it to build test and deploy. For this reason, makes Jenkins an ideal choice for the continuous integration server.

Continuous Integration With Jenkins
Continuous Integration With Jenkins

What is Continuous Integration?

Let’s assume a bunch of developers is working on the same project and code.

If code check-ins do not happen quickly every day would be very costly for the whole project.

Early detection of such issues will ensure the quick delivery of software so as a part of continuous integration what is  demanded is that every developer check-in code every day

Now the end of the day you have an automated server called Jenkins continuous integration tool which will wake up and pulls the latest code from the source control management system which is nothing but the GIT and build the code compile the code and test the code.

In case of any breakage or errors found in the code Jenkins server will send the notification to all the developers who ware working on the same code via email or notification that some this is broken.so this type of early error detection and automation of build, compile and test will be very helpful for the continuous delivery of the software development.

You can see the complete flow of the Continuous Integration from the below picture.

Flow Of Continuous Integration
Flow Of Continuous Integration

 

Why do we need of Continuous Integration or Continuous Delivery?

Let’s look at the below picture with a simple scenario

CI/CD
CI/CD

We have a number of the developer which will develop the code and committing that code to the code repositories and this repository to compile the code and execute the code and then send it to the quality assurance team.

Now this QA team will manually test like unit testing, integration testing to check if there are any logical errors in the code and once they are done fixing the error the directly deploy the application to the production environment.

But this has resulted in the failure of the application so let’s look at the reason why did application get failed.

  • Different Environment (servers)
  • Different Libraries and packages
  • End-user load(traffic)
  • App not accessible to the intended audience

Let’s look at each reason why application gets fails when we deployed in production.

Different Environment :

The application is tested on the environment is different from the production environment. Because of this application, get fails to run on the production environment.

Different libraries and packages :

If the two environments are different they going to support different libraries and packages so that why the code is compatible with a testing environment and not on the production environment.

End-user load:

The production server is not capable enough handling the end-user load because which the server get crashes.

 

So what is end-user load here?

The production server has a threshold beyond which the server is not capable to process anymore user request Now if the production server is flooded with too many users request and it is not capable enough to process these many requests then the server ends up with the crashing so that’s why the application get failed here.

Now we will discuss how these reasons overcome by using continuous delivery pipeline with the Jenkins. 

What is  Continuous Delivery Pipeline?

Stages of the Continuous Delivery Pipeline :

  • Development Team
  • Version Control System
  • Build and Test (Jenkins)
  • Test Environment ( Acceptance testing, load testing )
  • Production Ready

So let’s look at each phase of the continuous delivery pipeline

Development Team : 

In this phase, the developer is writing the code for the application as per the client’s requirements.

Version Control System :

Once the developer writes the code they will push their code into any version control system like GIT. On the other hand, the version control system is the category of the software tool that helps the software development team to manage changes to the source code over time.

What is the version control system?

Basically, it will help you to track whatever changes you made in the code over a period of time. version control system or software keeps track of each and every modification happens with the source code. Developers can turn back the clock and compare the earlier version of the code to help fix the mistake while minimizing disruption to all the team member.

Why the version control system is required?

Let’s take one example, there is a team of developer who builds the application and they want to update the version of the application from version 1.0 to version 2.0

In order to do that developer will write new code or modify the same code and then commit the code into the version control system.

So now developer started the application using  under version 2.0 and lets say developer faces the lots of issue in the application so developer wants to shift to version 1.0 now he can easily do this because version control system has tracked and saved all the code changes that developer made.because of this reason version control system is required.

Build And Test :

Now, look into this phase, where you implement the continuous integration using tools like Jenkins. Now we have seen earlier what is continuous integration. On the other hand, the code should be pulled, build compiled and test continuously from the version control system using automation tool.

Instead of manually performing the unit test and integration test you can automate them using the tools such as Selenium test engine.

So as to log as you automate the process the delivery is going to be quicker and less prone to errors.

Test Environment ( Acceptance Testing, Load Testing ):

This is the most important part of the continuous delivery pipeline because this will make sure the software is always in the production-ready state in the other hand software has to be in such a state that its ready to release.

Various testing carried out to do the same as acceptance testing and load testing.

What is load testing?

This is performed to check the behavior of the application under a certainly expected load.

We saw previously the application fails on the production level because of unable to process the too many user requests.now in this case by implementing the continuous delivery that failure is not going to occur because we are performing load testing.

In load testing where we check how much of user load the application is capable of processing.

What is user acceptance testing?

Here, in this case, the user can access the application without any problem. in case if the user finds any problem in the application then the feedback will be immediately sent to the developer to make the required changes and commit them to the version control system.

CD Pipeline
CD Pipeline

Advantages of the Continuous Delivery

  • Automate Software Releases.
  • Increases The Developer Productivity
  • Locate and Addresses the Bugs Quicker.

Let’s look at each advantage in detail.

Automate Software Releases:

The first advantage is that it automates software releases. The continuous delivery makes sure it uses automation tool in each phase of the software development life cycle. Whether it is building testing and deploying all of these have to be automated now because of doing this the software delivery become faster and it is less prone to any human errors.

Increases Developer Productivity:

Next Advantage is it increases the developer productivity because of continuous delivery automated the developer finally focuses on building new features so in this way developer productivity increases.

Locate and addresses the bugs quicker:

The most important advantage is we can find the bugs and address them in a quick manner.

Once you find the bugs we can fix it using automation tools.

 

Case Study 1

Continuous Delivery At HP(Hewlett-Packard)

Now let’s see how continuous delivery solved the problems at HP. HP is a Techno giant which offers worldwide IT, technology & enterprise products, solutions, and services. HP Inc is the retainer of HP’s Computer and printer business which ensures that there is a perfect device for every office or home, based on their need.

Problem:

  •  In 2008 they were facing problems, their product delivery cycle was slow.
  • It took them 6-12 months to build new features; making them slower than all their competitors.

Solution:

HP come up with the new plan and the target of this new plan was to improve the developer productivity by a factor of 10. Now in order to achieve this, they came up with three high-level goals.

  • A single platform to support the whole workflow.
  • Improved quality software release.
  • Faster release.

How did they achieve this?

They implemented a continuous delivery pipeline with two important features.

  • Practicing Continous Integration.
  •  Automation at every step.

End Result:

  • Overall development cost reduced by 40%.
  • Programs under development increased by 140%.
  • Development cost per program went down by 78%.

 

 

Case Study 2

Continuous integration At AcadGild

I am pretty sure you all have enrolled for the AcadGild technical courses at some point in your life.in a software development project at AcadGild there was a process called two-day builds. two-day builds can be thought of as a predecessor to Continuous Integration. It means that every two days an automated system pulls the code added to the shared repository throughout the day and builds that code.

The idea is quite similar to Continuous Integration, but since the code that was built in two days was quite large, locating and fixing of bugs was a real pain. Due to this, Acadgild adopted Continuous Integration (CI). As a result, every commit made to the source code in the repository was built. If the build result shows that there is a bug in the code, then the developers only need to check that particular commit. This significantly reduced the time required to release new software.

CI in Acadgild
CI in Acadgild

 In conclusion

We hope this post was helpful to you to know what Jenkins and how it works.

In the next blog, we will see how to create a continuous integration pipeline with Jenkins.

Keep visiting our website AcadGild for further updates on the DevOps and other technologies.

>