Continuous integration CI

0
272

Introduction

Continuous integration (CI) is a software development methodology in which developers merge updated code into a team’s common repository frequently. After the update, automated build and test suite jobs are triggered which verify the changes. The frequency of integration is usually daily but it can also vary from project to project.

The developers typically add small incremental changes into the repository. Hence, the major benefits of continuous integration as a process is that it helps locate defects or problems very easily and early on. It is relatively easy to locate the source of error because of the incremental nature of the upgrade.

CI is a common way of development in an agile environment where requirements are volatile and code changes are continuous. CI provides the best practice with implementation ease of frequent code integration, build and test automation.

Why Continuous Integration

Before the deployment of Continuous integration process, all developers of the team will work on their code until it was complete. After completion, in the end, they will merge into the central repository. Next, they used to run the build and test suites and verify the results. This process although straight forward had the drawback that the problems and bugs were identified at the end in the process. Thus, finding and isolating the bugs was a challenging activity. Moreover, this also resulted in several integration problems when the code from all the developers came together at once.

On the other hand, continuous integration helps the developers to merge code easily and frequently. Therefore, they get constant feedback in terms of integration problems, build errors and bugs about their code changes. Therefore, continuous integration makes integration of work easier. Also, it prevents late showstoppers and supports continuity in the development process.

Components of Continuous Integration

CI provides an easy way of integrating various development processes at one place like

  1. Source code repository: CI integrates code repository tools like Git, GitLab, ClearCase, SVN, and various others. CI jobs can easily pick the code changes from these source control systems and perform further operations.
  2. Build Tool Integration: CI integrates build tools like Maven, Ant, Gradel, Ivy, and others for building the code.
  3. Test automation: CI can trigger automation tests of different tools like Selenium, Cucumber, TestComplete, and UFT to name some. Moreover, it can publish the test reports as well.
  4. Continuous Integration Servers: Jenkins, TeamCity, Bamboo, Codeship are commonly available CI tools.

Benefits of Continuous Integration

Continuous Integration has several benefits to offer over the traditional integration process:

  • Helps developers by reducing manual tasks and streamlining the development process.
  • Reduces the time and effort for the integration of code from different developers.
  • Allows developers to focus on other important development tasks by reducing the debugging effort.
  • Helps in finding the defects and problems early in the development cycle. It delivers quick feedback about the changes.
  • Makes the development process simple, faster and reliable. Thus, improves customer satisfaction.
  • Leads to faster iterations of the product.
  • Reduces risks of the product by frequent tests and deployment.
  • Improves the quality of the product by eradicating errors.

Process of CI

Continuous Integration requires the implementation of several best practices. Following are the integral parts of the process

  1. Single Code repository: It requires maintenance of a single code repository for the product by the team where developers can check-in and commit their code changes.
  2. Merge: The developers frequently merge their code into the source code repository of the product, for example, Git and trigger the job at CI tool. The Continuous Integration tool picks up the code from the central repository for further processing.
  3. Automated Build: CI uses build tools like Maven to build the code from the source code repository. If the build is unsuccessful, errors are notified to the team. After a successful build, it proceeds to execute the tests.
  4. Automated tests: The CI tool executes the automated tests present like unit, integration, system or functional tests. It builds the build and tests log for further analysis. It can also be configured to get the test reports which can also be emailed to the concerned team.
  5. Deployment: Code deployment happens readily after a successful build and tests run.

 

What is Continuous Delivery

Continuous delivery is the process of frequently deploying the code into production in one click. This is achieved by keeping the codebase in ready to deploy state always. In order to implement continuous delivery, it requires sustainable configuration management, continuous integration, and continuous testing. Also, it aims at automating most of the tasks like build, deployment, testing to minimize the manual effort reliably.

What is Continuous Deployment

Continuous deployment is the process in which every change which passes the CI tests automatically gets deployed into production. This process results in multiple deployments throughout the day and provides fast feedback about the changes to the developers.

What is Jenkins

Jenkins is the most famous CI/CD server in use today. It supports building, automating tests and deployment of the projects. Also, it is open source and is highly extensible with the use of several plugins as per the development needs of the team. Further, Jenkins can be used simply as a CI/CD server or can be configured to become a continuous delivery system.

 

Some of its features which make it desirable for any project are

  • open source with a large and growing support community base
  • Java application developed in java.
  • Highly extensible to support several source control, build, automation and deployment needs.
  • Can easily automate the development process of building, running automation tests and publishing report.
  • easy to install and configure.
  • works across multiple OS and browsers.
  • can work in a distributed environment.
  • performs tasks at a fast pace.

You can download Jenkins from here.

Conclusion

Continuous Integration is a modern way to the software development process. It serves as the backbone of agile development and has multiple advantages over the traditional process. CI invariably equips developers with continuous code integration, builds and automation testing providing constant feedback on their work. It not only automates manual tasks but also makes them faster. Hence, it works on improving customer satisfaction with faster and quality deliveries.

LEAVE A REPLY

Please enter your comment!
Please enter your name here