Reference: How the Continuous Integration Process Works

Today we will delve into the history of the term, discuss the challenges of implementing CI, and provide several popular tools that can assist with it.

Reference: How the Continuous Integration Process Works
/ Flickr / Altug Karakoc / CC BY / Фото изменено

Term

Continuous Integration is an approach to application development that implies frequent project builds and code testing.

The goal is to make the integration process predictable and to detect potential bugs and errors at an early stage, allowing more time for their correction.

The term Continuous Integration first appeared in 1991. It was introduced by the creator of the UML language, Grady Booch (Grady Booch). The engineer presented the CI concept as part of his own development practice— Booch's method. It implied incremental refinement of architecture in the design of object-oriented systems. Grady did not specify any requirements for continuous integration. But later in his book, "Object-Oriented Analysis and Design with Applications", he stated that the methodology's goal is to accelerate the release of "internal releases."

History

In 1996, the creators of the methodology of Extreme Programming (XP)— Kent Beck (Kent Beck) and Ron Jeffries (Ron Jeffries) adopted CI. Continuous integration became one of the twelve key principles of their approach. The founders of XP refined the requirements for the CI methodology and emphasized the necessity of performing project builds multiple times a day.

In the early 2000s, one of the founders of Agile Alliance, Martin Fowler (Martin Fowler), began promoting the continuous integration methodology. His experiments with CI led to the creation 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 that periodically checks the version control system for changes in the codebase. The solution can still be downloaded today—it is distributed is under a BSD-like license.

With the emergence of CI software, more and more companies began to adopt the practice. According to a Forrester [p.5 report], in 2009, 86% of fifty surveyed technology companies were using or implementing CI methods.

Today, Continuous Integration practices are being adopted by organizations across various industries. In 2018, a major cloud provider conducted a survey among IT professionals in the service, education, and finance sectors. Out of six thousand respondents, 58% reported using CI tools and principles in their work.

How it works

The foundation 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 the cloud environment. Developers upload new code one or several times a day. The CI server automatically copies it along with all dependencies and performs the build. Afterwards, it runs integration and unit tests. If the tests pass successfully, the CI system deploys the code.

The overall scheme of the process can be represented as follows:

Reference: How the Continuous Integration Process Works

The CI methodology imposes a number of requirements on developers:

  • Fix issues immediately. This principle comes from extreme programming. Fixing bugs is the highest priority task for developers.
  • Automate processes. Developers and managers should constantly seek out bottlenecks in the integration process and eliminate them. For example, testing often becomes a "bottleneck" in integration. It turns out that testing.
  • Build as frequently as possible. Once a day, to synchronize the team's work.

Challenges of implementation

The first issue is high operational costs. Even if a company uses open CI tools (which we will discuss further), it still has to spend money on supporting the infrastructure. However, cloud technologies may provide a solution.

They simplify the building of varied computer configurations. Plus, companies only pay for the resources they use, which helps save on infrastructure. are paid According to surveys [p.14

], continuous integration increases the workload for employees (at least at first). They have to learn new tools, and colleagues are not always available to assist with training. Therefore, they often need to figure out new frameworks and services "on the go." article], continuous integration increases the workload on company employees (at least for the first period). They have to master new tools, and colleagues do not always assist with training. Therefore, they need to figure out new frameworks and services "on the go."

The third challenge is automation issues. This is faced by organizations with a large amount of legacy code that is not covered by automated tests. This leads to the code being rewritten before full CI implementation.

Reference: How the Continuous Integration Process Works
/ Flickr / theilr / CC BY-SA

Who uses

Among the first to appreciate the advantages of the methodology were IT giants. Google use has been using continuous integration since the mid-2000s. CI was implemented to address delays in the search engine's workings. Continuous integration helped quickly identify and fix issues. Now CI is used across all departments of the IT giant.

Continuous integration also helps small companies, and CI tools are utilized by financial and medical organizations. For example, at Morningstar, continuous integration services helped patch vulnerabilities 70% faster. The medical platform Philips Healthcare was able to double the speed of testing updates.

Tools

Here are several popular tools for CI:

  • Jenkins — one of the most popular CI systems. It supports over a thousand plugins for integration with various VCS, cloud platforms, and other services. We also use Jenkins at 1cloud: the tool is part of our DevOps system.. It regularly checks the Git branch designated for testing.
  • Buildbot — a Python framework for writing custom continuous integration processes. The initial setup of the tool is quite complex, but this is offset by its extensive customization capabilities. Among the advantages of the framework, users note its low resource consumption.
  • Concourse CI — a server from Pivotal that uses Docker containers. Concourse CI integrates with any tools and version control systems. Developers note that the system is suitable for companies of all sizes.
  • Gitlab CI — a tool integrated into the GitLab version control system. The service works in the cloud and uses YAML files for configuration. Like Concourse, Gitlab CI employs Docker containers, which help isolate different processes from one another.
  • Codeship — a cloud CI server that works with GitHub, GitLab, and BitBucket. The platform does not require lengthy initial setup—standard pre-installed CI processes are available in Codeship. For small projects (up to 100 builds per month) and open source projects, Codeship is available for free.

Materials from our corporate blog:

Source: habr.com

Buy reliable website hosting with DDoS protection, VPS VDS servers 🔥 Buy reliable website hosting with DDoS protection, VPS VDS servers | ProHoster