Today we turn to the history of the term, discuss the complexity of the introduction of CI and give some popular tools that will help to work with it.
/ Flickr / Altug Karakoc / CC BY / Photo changedTerm
Continuous Integration (Continuous Integration) - an approach to application development, which implies frequent project assemblies and code testing.
')
The goal is to make the integration process predictable and to detect potential bugs and errors at an early stage so that there is more time to correct them.
The term Continuous Integration first appeared in 1991. It was introduced by the creator of the UML language Grady Booch. The engineer presented the concept of CI as part of his own development practice - the
method of Buch . He meant an incremental refinement of the architecture in the design of object-oriented systems. Grady did not describe any requirements for continuous integration. But later in his book "
Object-Oriented Analysis and Design with Applications " he said that the task of the technique is to speed up the release of "internal releases".
Story
In 1996, CI was adopted by the creators of the
Extreme Programming (XP) methodology -
Kent Beck and
Ron Jeffries . Continuous integration has become one of the twelve key principles of their approach. The founders of XP clarified the requirements for the CI methodology and noted the need to build the project several times a day.
In the early 2000s, one of the founders of the Agile Alliance,
Martin Fowler (Martin Fowler), promoted the methodology of continuous integration. His experiments with CI led to the emergence of the first software tool in this area - CruiseControl. The utility was created by Martin’s colleague Matthew Foemmel.
The build cycle in the tool is implemented as a daemon, periodically checking the version control system for changes in the code base. The solution can be downloaded today - it is distributed under a BSD-like license.
With the advent of software for CI, more and more companies began to adopt the practice. According to the Forrester study [page 5 of the
report ], in 2009, 86% of the fifty surveyed technology companies used or implemented CI methods.
Today, the practice of Continuous Integration is used by organizations from various industries. In 2018, a large cloud-based provider conducted a survey among IT professionals from service, education, and finance companies. Of the six thousand respondents, 58% responded that they use CI tools and principles in their work.
How it works
The basis of continuous integration consists of two tools - a version control system and a CI server. The latter can be either a physical device or a virtual machine in a cloud environment. Developers download the new code one or more times a day. The CI server automatically copies it with all dependencies and builds. After - runs the integration and unit tests. If the tests pass successfully, then the CI system deploys the code.
The general scheme of the process can be represented as follows:

The CI methodology has several requirements for developers:
- Immediately fix problems. This principle came to CI from extreme programming. Fixing bugs is the highest priority for developers.
- Automate processes. Developers and managers should constantly look for bottlenecks in the integration process and eliminate them. For example, testing is often the "bottleneck" of integration.
- Conduct assembly as often as possible. Once a day to synchronize the work of the team.
Implementation challenges
The first problem is high transaction costs. Even if a company uses open CI tools (which we will talk about further), it will still have to spend money to support the infrastructure. However, cloud computing could be a solution.
They simplify the assembly of multi-scale computer configurations. Plus, companies only
pay for the resources they use, which helps to save on infrastructure.
According to surveys [p.14 of the
article ], continuous integration increases the burden on company employees (at least for the first time). They have to learn new tools, and colleagues do not always help with training. Therefore, we have to deal with new frameworks and services "on the go."
The third difficulty is problems with automation. Organizations are faced with a large amount of legacy code that is not covered by automated tests. This leads to the fact that the code is simply rewritten before the full implementation of CI.
/ Flickr / theilr / CC BY-SAWho uses
One of the first advantages of the methodology was estimated by IT giants. Google has been
using continuous integration since the mid-2000s. CI implemented to solve the problem with delays in the search engine. Continuous integration helped to quickly identify and fix problems. Now CI is used by all divisions of the IT giant.
Continuous integration helps small companies as well, and CI tools are used by financial and medical organizations. For example, in Morningstar, continuous integration services helped patch vulnerabilities 70% faster. And the Philips Healthcare medical platform was able to double the speed of testing updates.
Instruments
Here are some popular tools for CI:
- Jenkins is one of the most popular CI systems. It supports more than a thousand plug-ins for integration with different VCS, cloud platforms and other services. We use Jenkins and we in 1cloud: the tool is included in our DevOps-system . He regularly checks the Git branch for testing.
- Buildbot is a python framework for writing your own continuous integration processes. The initial setup of the tool is quite complicated, but this is offset by the wide possibilities of customization. Among the advantages of the framework, users allocate its low resource intensity.
- Concourse CI is a Pivotal server that uses Docker containers. Concourse CI integrates with any tools and version control systems. The developers note that the system is suitable for work in companies of all sizes.
- Gitlab CI is a tool built into the GitLab version control system. The service runs in the cloud and uses YAML files for configuration. Like Concourse, Gitlab CI uses Docker containers that help isolate different processes from each other.
- Codeship is a cloud CI server that works with GitHub, GitLab, and BitBucket. The platform does not require a long initial setup — standard predefined CI processes are available in the Codeship. For small (up to 100 builds per month) and open source Codeship projects are available free of charge.
Materials from our corporate blog: