DEV Community

Shahriyar Al Mustakim Mitul
Shahriyar Al Mustakim Mitul

Posted on

What is Continuous Integration (CI)

WORKING in a team, all the code can be put in a central version control system like GitHub.

Image description

Developers will pull and push cods\es regularly.

Image description
Every day there will be code pushes and pulls. Thus code updates regularly.
This code will be moved to build server and there it will be build, tested and evaluated.

Image description

Thus our software will be created and will be saved in a Artifact repository.This is generated from the build process.

Image description

This artifact will be packaged in a specific format.
It is War/jar for Java.DLL/EXE/MSI in windows. Moreover, it can be in ZIP or tar.

Then it has to be shifted from repository to the servers.

Image description

After deploying this artifact into the servers, testers can run testing.

Image description

Once it is approved, it is shipped to production servers.

Image description

So, that's how it works.

But lets see what problem arises in this cycle.
After the coders complete coding , they push it to GitHub.

Image description

Assuming they have coded for 3 weeks and now need rest.

Image description
Now all of the codes will go to the build servers.

Image description
Now this code is build and tested and oh boy!!!
Lots of errors.

Image description

Thus developers team need to fix all of these issues.

Image description

This could have been resolved if the problem was detected very early in the process.

Image description

The developers could get notify when the error occurs and could code accordingly . But it was not detected.

Thus what could be the solution?
After every commit by the coders, the code should be build and tested. Right? Thus finding issue or error would be easier and a developer can easily solve it.

Image description

As developers will build and test multiple times a day, it is manually impossible or tiresome. Thus, automate it!

Image description

So, when a developer commits any code it will automatically go to the server and get build and tested.

Image description

Image description
It will then send a notification if there is a failure.

Image description

Image description

As soon as the developer finds and issue,he/she will resolve it.

Image description

Image description

He/ she will commit again fixing the issue.
Again it will go to the servers and build and test will be run. It found no issue, it will be stored in the software repository.

Image description

Image description

Image description

Image description

Image description

Done!
Therefore, after a successful testing , it will automatically go through all other steps we previously mentioned.

Let's see a cyclic view.

Image description
This is called Continuous Integration.

Image description

The goal of CI is to detect issues in a very early stage.

Image description

So, this is what happens using Jenkins as our CI tool.
Image description

Image description

Image description

So, these are the tools used:

  1. IDE.

Image description

  1. Integrated with a version control system.

Image description

  1. Build tools based on the programming languages.

Image description

  1. Software repositories to store artifacts.

Image description

  1. CI Tools that integrates everything.

Image description

That's it.

Top comments (0)