Battle of Jenkins and GitLab CI/CD

In the last decade, significant advances have been made in the development of tools for continuous integration (Continuous Integration, CI) and continuous deployment (Continuous Delivery, CD). The development of technologies for integrating software development and operation (Development Operations, DevOps) has led to a rapid increase in demand for CI / CD tools. Existing solutions are constantly being improved, trying to keep up with the times, their new versions are released, in the world of quality assurance software (Quality Assurance, QA), many new products are constantly appearing. With such a wealth of choice, choosing the right tool is not an easy task.

Battle of Jenkins and GitLab CI/CD

Among all the existing CI / CD tools, there are two projects that are definitely worth paying attention to someone who is looking for something from this area. We are talking about Jenkins and the GitLab CI / CD tool, which is part of the GitLab platform. Jenkins has more than 16000 stars on GitHub. The GitLab repository on gitlab.com scored a little more 2000 stars. If we compare the popularity of the repositories, it turns out that Jenkins scored 8 times more stars than the platform, which includes GitLab CI / CD. But when choosing a CI / CD tool, this is far from the only indicator that you should pay attention to. There are plenty of others, and this explains why in many comparisons, Jenkins and GitLab CI / CD are very close to each other.

Take, for example, data from the G2 platform, which accumulates reviews of a wide variety of products and the ratings that users give them. Here is the average rating Jenkins, based on 288 reviews, is 4,3 stars. Oh oh GitLab there are 270 reviews, the average rating for this tool is 4,4 stars. We will not be mistaken in saying that Jenkins and GitLab CI / CD compete with each other on equal terms. It is interesting to note that the Jenkins project appeared in 2011 and since then it has been a favorite tool for testers. But at the same time, the GitLab CI / CD project, launched in 2014, has taken its position, very high, thanks to the advanced features offered by this platform.

If we talk about the popularity of Jenkins in comparison with other similar platforms, we note that we, having published an article comparing the Travis CI and Jenkins platforms, arranged a survey. 85 users participated in it. Respondents were asked to choose the CI/CD tool they like the most. 79% chose Jenkins, 5% chose Travis CI, and 16% indicated that they prefer other tools.

Battle of Jenkins and GitLab CI/CD
Poll Results

Among other CI/CD tools, GitLab CI/CD was mentioned most often.

If you are serious about DevOps, then you need to carefully select the appropriate tools, taking into account the specifics of the project, its budget, and other requirements. To help you make the right choice, we are going to review Jenkins and GitLab CI/CD. This will hopefully help you make the right choice.

Introduction to Jenkins

Battle of Jenkins and GitLab CI/CD
Jenkins is a well-known, flexible CI/CD tool designed to automate many tasks related to software projects. Jenkins is written entirely in Java and released under the MIT license. It has a powerful set of features aimed at automating the tasks associated with building, testing, deploying, integrating, and releasing software. This tool can be used on various operating systems. These include macOS, Windows, and many Linux distributions such as OpenSUSE, Ubuntu, and Red Hat. There are installation packages for Jenkins designed for various OSes, this tool can be installed on Docker and on any system that has a JRE (Java Runtime Environment).

The Jenkins developers have created another project, Jenkins X, which is designed to work in a Kubernetes environment. Jenkins X integrates Helm, the Jenkins CI/CD server, Kubernetes, and other tools to build CI/CD pipelines that follow DevOps best practices. For example, GitOps is used here.

One can add to the treasury of the advantages of Jenkins the fact that its scripts are very well structured, understandable, and easy to read. The Jenkins team has created about 1000 plugins that are aimed at organizing the interaction of Jenkins with a wide variety of technologies. Scripts can use authentication systems, which, for example, allows you to connect to various closed systems.

During the operation of the Jenkins pipeline, you can observe what happens at each step, whether certain stages of work have been completed successfully or not. You can watch all this, however, without using a certain graphical interface, but using the capabilities of the terminal.

Features of Jenkins

Among the well-known features of Jenkins are ease of setup, a high level of automation of various operations, and excellent documentation. If we talk about solving DevOps tasks, then here Jenkins is considered a very reliable tool, using which, as a rule, it makes no sense to closely monitor the entire process of project processing. This is not the case with other CI/CD tools. Let's talk about some of the most important features of Jenkins.

▍1. Free, open source, multi-platform support

Jenkins can run on macOS, Windows and Linux platforms. It can also function in a Docker environment, which allows you to organize uniform and fast execution of automated tasks. This tool can also run as a servlet in Java-enabled containers such as Apache Tomcat and GlassFish. Installation of Jenkins qualitatively documented.

▍2. Developed plugin ecosystem

The Jenkins plugin ecosystem appears to be much more mature than the plugin ecosystems of other CI/CD tools. There are currently over 1500 plugins for Jenkins. These plugins are aimed at solving a wide range of tasks, with their help you can automate a variety of projects. The wealth of free plugins to choose from means that if you're using Jenkins, you don't have to buy expensive paid plugins. There is a possibility Integration Jenkins with many DevOps tools.

▍3. Easy installation and setup

Jenkins is fairly easy to install and configure. At the same time, the process of updating the system is also very convenient. Here, again, it is worth mentioning the quality of the documentation, since in it you can find answers to a variety of questions related to installing and configuring Jenkins.

▍4. Friendly community

As already mentioned, Jenkins is an open source project, the ecosystem of which includes a huge number of plugins. A large community of users and developers has developed around Jenkins to help develop the project. The community is one of the factors that drives the development of Jenkins.

▍5. Availability of REST API

While working with Jenkins, you can use the REST API, which expands the capabilities of the system. API for remote access to the system is presented in three versions: XML, JSON with JSONP support, Python. Here Documentation page covering details on working with the Jenkins REST API.

▍6. Support for parallel execution of tasks

Jenkins supports parallelization of DevOps tasks. It can be easily integrated with relevant tools and receive notifications about the results of tasks. Code testing can be accelerated by organizing a parallel build of the project using different virtual machines.

▍7. Support for work in distributed environments

Jenkins allows you to organize distributed builds using multiple computers. This feature is applicable in large projects and uses a scheme of work, according to which there is one master Jenkins server and several slave machines. Slave machines can also be used in situations where it is necessary to organize testing of a project in different environments. These features set Jenkins apart from other similar projects.

Introduction to GitLab

Battle of Jenkins and GitLab CI/CD
GitLab CI/CD can be called one of the newest and most beloved DevOps tools. This free open source tool is built into the GitLab version control system. The GitLab platform has a community version, it supports repository management, issue tracking tools, code review organization, documentation-oriented mechanisms. Companies can install GitLab locally, linking it to Active Directory and LDAP servers for secure user authorization and authentication.

Here A video tutorial to help you learn how to create CI/CD pipelines using GitLab CI/CD capabilities.

GitLab CI/CD was originally released as a standalone project, but in 2015 this set of tools was integrated into GitLab 8.0. A single GitLab CI/CD server can support over 25000 users. Based on such servers, you can create systems that are highly available.

GitLab CI/CD and the main GitLab project are written in Ruby and Go. They are released under the MIT license. GitLab CI/CD, in addition to the usual features of CI/CD tools, also support additional features related, for example, to work scheduling.

Integrating GitLab CI/CD into a project is very easy. When using GitLab CI/CD, the project code processing process is divided into stages, each of which can consist of several tasks performed in a certain order. Tasks can be fine-tuned.

Tasks can run in parallel. After setting up the sequence of stages and tasks, the CI/CD pipeline is ready to go. You can monitor its progress by monitoring the status of tasks. As a result, using GitLab CI / CD is very convenient, perhaps more convenient than other similar tools.

Features of GitLab CI/CD and GitLab

GitLab CI/CD is one of the most popular DevOps tools. The project is distinguished by high-quality documentation, its features are easy and convenient to use. If you are not yet familiar with GitLab CI/CD, the following list of this tool's features will give you a general idea of ​​what you can expect from it. It should be noted that many of these features are related to the GitLab platform itself, in which GitLab CI / CD is integrated.

▍1. Popularity

GitLab CI/CD is a relatively new tool that has found widespread use. GitLab CI/CD has slowly become a hugely popular CI/CD tool used for automated testing and software deployment. Its simple to set up. It is also a free CI/CD tool built into the GitLab platform.

▍2. Support for GitLab Pages and Jekyll

Jekyll is a static site generator that can be used within the GitLab Pages system to create sites based on GitLab repositories. The system takes the source materials and generates a ready-made static site based on them. You can control the appearance and features of such sites by editing the file _config.yml, used by Jekyll.

▍3. Project planning capabilities

Thanks to the ability to plan the stages of projects, the convenience of tracking problems and their groups increases. This allows you to manage the organization of work on projects, plan their implementation on a specific date.

▍4. Automatic scaling of CI runners

Thanks to the automatic scaling of runners responsible for performing specific tasks, you can save a lot on the cost of renting server capacities. This is very important, especially when it comes to environments where projects are tested in parallel. In addition, this is important for large projects consisting of several repositories.

▍5. Issue tracking tools

GitLab's powerful issue tracking capabilities have led many open source projects to use the platform. GitLab CI/CD allows parallel testing of different code branches. Test results are conveniently analyzed in the system interface. This sets GitLab CI/CD apart from Jenkins.

▍6. Restricting access to repositories

The GitLab platform supports restricting access to repositories. For example, those who collaborate on a project in a repository can be assigned permissions appropriate to their roles. This is especially true for corporate projects.

▍7. Active community support

An active community has developed around GitLab, which contributes to the development of this platform and its tools, in particular, GitLab CI / CD. Deep integration of GitLab CI/CD and GitLab, among other things, makes it easy to find answers to questions that arise when working with GitLab CI/CD.

▍8. Support for various version control systems

GitLab CI/CD is a system that can work with more than just code hosted in GitLab repositories. For example, the code can be stored in a GitHub repository, and the CI / CD pipeline can be organized on the basis of GitLab using GitLab CI / CD.

Comparison of Jenkins and GitLab CI/CD

Jenkins and GitLab CI/CD are very good tools, both of which are capable of making the CI/CD pipeline run smoothly. But if you compare them, it turns out that, although they are similar in many ways, they differ from each other in some ways.

Characterization
Jenkins
GitLab CI/CD

Open source or closed source
Open source
Open source

Installation
Required.
Not required as this is a built-in feature of the GitLab platform.

Unique features
Support for plugins.
Deep integration into version control system.

Support
Absent.
There is.

Installation and Setup
Difficulties do not cause
Difficulties do not cause

Self-deployment of the system
This is the only way to use the system.
Supported.

Creating CI/CD Pipelines
Supported, using Jenkins Pipeline.
Supported.

Application performance monitoring
Absent.
There is.

Ecosystem
There are over 1000 plugins.
The system is being developed within GitLab.

API
Supports an advanced API system.
Offers an API for deeper integration into projects.

JavaScript support
There is.
There is.

Integration with other tools
Integration with other tools and platforms is supported (Slack, GitHub).
Many tools for integration with third-party systems, in particular - with GitHub and Kubernetes.

Code quality control
Supported - using the SonarQube plugin and other plugins.
Supported.

Differences between Jenkins and GitLab CI/CD

Having described and compared Jenkins and GitLab CI/CD, let's focus on the differences between these DevOps tools. Knowing these differences will help you understand those who prefer one of these tools over the other.

  • GitLab CI/CD can fully control Git repositories. We are talking about managing repository branches and some other features. But Jenkins, although it can work with repositories, does not give the same level of control over them as GitLab CI / CD.
  • Jenkins is a free open source project. The one who chooses it deploys it independently. And GitLab CI / CD is included in the GitLab platform, this is a turnkey solution.
  • GitLab CI/CD supports advanced task management tools that work at the project level. This side of Jenkins is less developed.

Jenkins and GitLab CI/CD: strengths and weaknesses

Now you have some idea about Jenkins and GitLab CI/CD. Now, to get you even better acquainted with these tools, let's take a look at their strengths and weaknesses. We assume that you have already decided which tool you need. Hopefully, this section will allow you to test yourself.

▍Strengths of Jenkins

  • A large number of plugins.
  • Full control over tool installation.
  • Simple debugging of runners.
  • Easy node setup.
  • Easy code deployment.
  • Very good credential management system.
  • Flexibility and versatility.
  • Support for various programming languages.
  • The system is understandable on an intuitive level.

▍Weaknesses of Jenkins

  • Plugins can be tricky to use.
  • When using Jenkins in small projects, the time required to configure it yourself can be unreasonably large.
  • Lack of general analytical information on CI/CD chains.

▍Strengths of GitLab CI/CD

  • Good integration with Docker.
  • Simple scaling of runners.
  • Parallel execution of tasks that are part of the stages of the CI/CD pipeline.
  • Using the directed acyclic graph model when setting up task relationships.
  • High level of scalability due to the possibility of parallel execution of runners.
  • Ease of adding tasks.
  • Simple conflict resolution.
  • Reliable security system.

▍Weaknesses of GitLab CI/CD

  • For each task, you need to describe and upload / download artifacts.
  • You cannot test the results of merging branches before they are actually merged.
  • When describing the stages of the CI / CD pipeline, it is not yet possible to single out individual stages in them.

Results

Both Jenkins and GitLab CI/CD have strengths and weaknesses. The answer to the question of what to choose depends on the needs and characteristics of a particular project. Each of the CI/CD tools reviewed today has certain features, although these tools were created to solve the same problem. At the same time, Jenkins is a standalone tool, and GitLab CI / CD is part of a platform designed for collaborating on code.

When choosing a CI / CD system, in addition to its capabilities, it is worth taking into account the costs that may be associated with it, and what exactly DevOps engineers who support the project are used to working with.

What CI/CD tools do you use?

Battle of Jenkins and GitLab CI/CD

Battle of Jenkins and GitLab CI/CD

Source: habr.com

Add a comment