.

What are Continuous Integration Tools for DevOps Engineers?

DevOps is undoubtedly one of the most popular terms in the IT world. Among the prerequisites for working as a DevOps engineer are the skills in the field of software development and knowledge of its implementation processes. Due to the wide range of technologies and the need for having specialist knowledge, it's essential to choose the right tools for work.

On the way to continuous integration

Anyone who actively lives in the information technology industry has encountered the term "continuous" many times. The word for "an activity or process that is unbroken and uninterrupted" is most common in DevOps teams and appears in the CI/CD solution that helps streamline the software development process. Among its several types, the Continuous Integration tool – which was the beginning of the creation of CI/CD – stands out.

To better understand the essence of this tool, we have to go back a few years and recall the software implementation process. Back then, most of the work was done by developers in isolation, without any automation, and merging the code changes was difficult and time-consuming. At that time, there were no code repositories, and changes were communicated by means of USB flash drives or FTP server. The result of such a way of working was: a long time to generate a package for implementation, execution of error-prone, manual, and repetitive processes and lack of application testing. The solution to these problems was the CI system – which now is basic DevOps practice – automating most of the activities, unifying various development environments, facilitating the transfer and testing of changes, while saving the team's time.

What is a CI (continuous integration)?

The basic principle of continuous integration is introducing changes to the main branch of the code as often and regularly as possible, and then building and testing them. The entire process is carried out on a single, shared source code repository accessible by all the people involved in the project. In addition to its main function as a continuous integration tool, CI is also a solution that automates application testing after every introduced change. This practice extends the standard concept of code integration to include continuity, which encourages more frequent code change introductions and allows you to detect bugs and reduce conflicts at an early stage. Early feedback and the automation of compilation and test processes help to reduce the time needed to move from the approved code to a successful launch in the production environment. All these factors enable faster implementation of updates and fixes, reducing the mean time to recovery (MTTR).

The operating cycle in continuous integration

Source: Mind the Product

Continuous integration and continuous delivery

Continuous delivery, another element of CI/CD, extends continuous integration with the automatic building of ready-made implementation packages. When we compare both tools, CI is responsible for build, while CD is responsible for release. CD automates the delivery of applications to not only production but also development and testing environments. However, the implementation process itself is manual.

Continuous integration, as we’ve already mentioned, is a practice based on automatically testing every change in the code repository, while continuous delivery is the process of making changes to new features, configurations, and bug fixes. CI is launched immediately after detecting and downloading a change provided by the developer, while in continuous delivery the code is continuously developed and delivered until the programer confirms that the code is ready to be delivered.

Continuous integration and continuous delivery work closely together, but they require constant testing because the fate of the implemented application depends on them.

A diagram showing components of continuous integration, continuous delivery, and continuous deployment

Source: Atlassian

What are continuous integration tools?

The market offers many tools for continuous integration which supplement the software development process. Every tool has different characteristics and architecture, but their common goal is to increase the quality and speed of application delivery. By using continuous integration as part of its strategy, the company saves time and money. Therefore, the key is to choose the right tool, tailored to the goals of the organization. The selection factors include the available features, tool expandability, supported programming platforms and languages, cost, and ease of use.

The selected tool should seamlessly perform the main stages of the integration process, that is:

  • monitoring and downloading code changes,
  • building new code,
  • code testing,
  • error fixing.

The use of continuous integration tools ensures the stability and cleanliness of the code, and prevents conflicts, such as errors and duplicated code. CI can be achieved in two ways – as a manual build and as a server-handled build. Both solutions fulfill their functions at the same level, but the choice is up to a given company. Teams that don’t use a CI server may achieve continuous integration by periodically making compilations and creating scripts by themselves. Such an approach requires greater control over the source code, as well as the testing and approval processes. For teams that use the latter solution, there are plenty of ready-made DevOps tools to facilitate continuous integration.

CI server, also known as build server, is used primarily for automation and to and check the integrity of the change provided by the developer with the current version of the code and all the fixes and dependencies introduced by the other team members. CI servers often also contain the history of changes, generate notifications about the status of the work in progress, and combine information from multiple projects. It's therefore important to choose from a large number of available solutions the right tool that'll provide a stable platform for ongoing programming projects.

Jenkins continuous integration

Jenkins is one of the most popular tools created with continuous integration in mind. This open source solution, written in Java, is used to automate the steps of building and testing the application and makes it easier for developers to integrate the required changes into the project. Jenkins is a multi-platform tool, so it can be run both in an on-premise environment, as well as in the cloud or using Docker. In addition, it has a huge number of plug-ins allowing for integration with various platforms. However, the multitude of plug-ins, combined with an unfriendly graphical interface, that hasn’t changed for years, requires a lot of work and patience from a DevOps team during the – usually not so easy – project configuration.

In addition to compiling the project, performing unit and integration tests, and building the application, Jenkins is able to launch static code analysis and automated tests. Another advantage of this tool is its flexibility and the ability to work in dispersion. This makes it possible to run multiple processes on multiple machines at the same time, speeding up the compilation, testing, and deployment of applications, and significantly facilitates distribution to different environments. Due to the great popularity of Jenkins all over the world, it has tremendous support of the community gathered around it.

GitLab continuous integration

GitLab, known by developers as a repository versioning tool, also offers its own CI system. The great advantage of this solution is that the repository and the runtime environment are in a single place. In addition, the system has many integrated solutions that allow implementing complex applications. The extensive integration with Kubernetes and launching its services (e.g. helm) are primarily used in applications based on microservices. GitLab Runner, the very heart of the tool, allows running tasks from the GitLab level and is responsible for the safe storage of sensitive data. It can be configured locally, on GitLab servers, on on-premise machines, or the ones supplied by a public cloud provider.

GitLab CI configuration is carried out using a file in the main project directory called .gitlab-ci.yml. The YAML file defines the stages of the pipeline operation and the sections concerning, for example, Docker images, commands, and variables. In addition, using Docker also enables building, testing, and deployment in environments other than production. GitLab CI appeals with its ease of configuration, clarity of the interface, and active community support.

AWS CI

The provider of the largest public cloud offers the AWS CodeBuild service as a continuous integration tool for compiling the code, running tests, and preparing the package for application implementation. This solution eliminates the need to make available, manage and scale your own compilation servers, as it provides its own fully managed source code compilation service called CodeBuild. This dynamically created server scales continuously and automatically to cope with peak requests of a compilation. A DevOps engineer setting up AWS CodeBuild may use ready-made compilation environments for the most popular programming languages (e.g., Apache, Maven), or create custom environments that use their own compilation tools.

CodeBuild is billed in the pay-as-you-go model so you pay for the actual computing resources used. There are several ways to use the tool. Amazon Web Services allows the user to create and manage builds using the AWS, AWS CLI, SDK web console, and the AWS CodePipeline service.

A diagram showing the collaboration between Amazon Web Service CodePipeline and AWS CodeBuild

Source: Amazon

Buddy CI

This is a Polish product which is developing very dynamically around the world. The main advantage of this tool is the short process setup time. This is mainly due to the architecture of Buddy, which was meant to be simple and easy to use. A standard CI/CD process can be set up in approx. 10 minutes. This is supported by the very friendly UX, which stands out from the competition in this respect. Buddy's simplicity, however, goes hand in hand with its enormous possibilities. It currently supports Docker, Kubernetes, the most popular languages and frameworks, and integrates with the largest public cloud providers.

The role of a DevOps engineer in this tool takes a back seat in a way, because Buddy has a rich set of predefined actions that allow you to configure automatic compilations, tests and deployments without the need to write scripts and have knowledge on scripting languages. Point, click and drag and drop – these are the main operations used when working with Buddy. In addition, the product offers many ready-made solutions (e.g., SSL Checker, PHP CodeSniffer, Image Compression) that only need a few minutes of setting up, while in other tools it would probably take several hours.

 

Ready continuous integration pipeline in the Buddy tool

Source: devstyle

Continuous integration – Bamboo

The Atlassian company's tool ensures continuous delivery from the stage of code writing to the implementation. In addition to the built-in full integration with other tools of this producer – Bitbucket and Jira Software – Bamboo supports all programming languages and allows integration with technologies such as Docker, AWS CodeDeploy, and Amazon S3. Working with this tool consists of setting up elements such as plans, stages, jobs, and tasks – all using a clear and flexible UI. Dedicated local and remote agents with a specific set of capabilities are used to perform these processes. In addition, Bamboo enables performing parallel automatic tests and allows for the release from embedded applications to selected test or production environments. Due to its commercial nature, the tool ensures operational stability and has professional 24/7 support.

An explanation of how the plan element works in Bamboo

Source: Atlassian

Continuous integration tools – summary

Continuous integration is an essential part of the work of DevOps engineers and development teams. It fits in as one of the main aspects of the software development and project management process. In addition to the benefits of process automation, implementing CI leads to better business outcomes. The organizations that use continuous integration effectively optimize human resources, and save money and time that they can use, for example, for strategy planning and employee development.

3. Best practices for software development teams