Among all the existing CI / CD tools, there are two projects that are definitely worth paying attention to for anyone looking for something from this area. We're talking about Jenkins and the GitLab CI / CD tool, which is part of the GitLab platform. Jenkins has over 16,000 stars on GitHub. The GitLab repository at gitlab.com has just over 2,000 stars. If we compare the popularity of repositories, it turns out that Jenkins has 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 worth paying attention to. There are tons 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 ratings that users give them. Jenkins has an average rating of 4.3 stars based on 288 reviews. And about GitLab here has 270 reviews, the average rating of this instrument is 4.4 stars. We won't be wrong in stating that Jenkins and GitLab CI / CD are competing 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 of testers. But at the same time, the GitLab CI / CD project, launched in 2014, took its positions, very high, thanks to the advanced capabilities offered by this platform.
If we talk about the popularity of Jenkins in comparison with other similar platforms, then we note that we, having published an article where the Travis CI and Jenkins platforms were compared, arranged a survey. 85 users took part in it. The respondents were asked to choose the CI / CD tool they like the most. 79% chose Jenkins, 5% chose Travis CI, and 16% indicated they prefer other tools.
Survey 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. In order to help you make the right choice, we are going to analyze Jenkins and GitLab CI / CD. This, hopefully, will help you make the right choice.
Introducing Jenkins
Jenkins is a well-known, flexible CI / CD tool designed to automate a variety of tasks related to software projects. Jenkins is written entirely in Java and released under the MIT license. It has a powerful set of capabilities aimed at automating tasks associated with building, testing, deploying, integrating, and releasing software. This tool can be used on a variety of operating systems. These include macOS, Windows and many Linux distributions such as OpenSUSE, Ubuntu, and Red Hat. There are Jenkins installation packages designed for different OS, this tool can be installed on Docker and on any system that has a JRE (Java Runtime Environment).
Jenkins developers have created another project, Jenkins X, which is designed to run on Kubernetes. Jenkins X integrates Helm, Jenkins CI / CD server, Kubernetes, and other tools to build CI / CD pipelines that follow DevOps best practices. For example, it uses GitOps here.
One can add to the bank of Jenkins' advantages 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 Jenkins interaction with a variety of technologies. In scripts, you can use authentication systems, which, for example, allows you to connect to various closed systems.
While the Jenkins pipeline is running, you can observe what is happening at each step, whether certain stages of work have been completed successfully or not. You can observe all this, however, without using a certain graphical interface, but using the capabilities of the terminal.
Jenkins features
Jenkins' well-known features include ease of configuration, a high level of automation of various operations, and excellent documentation. If we talk about solving DevOps tasks, then 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 Jenkins features.
β1. Free, open source, multi-platform support
Jenkins can run on macOS, Windows and Linux platforms. It can also run in Docker, allowing automated tasks to be executed consistently and quickly. This tool can also run as a servlet in Java-enabled containers such as Apache Tomcat and GlassFish. Jenkins installation is well documented .
β2. Developed ecosystem of plugins
The Jenkins plugin ecosystem looks much more mature than the plugin ecosystems of other CI / CD tools. There are currently over 1500 Jenkins plugins. 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 someone using Jenkins doesn't have a dire need to purchase expensive paid plugins. Jenkins can be integrated 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. There is a large community of users and developers around Jenkins who help the project develop. Community is one of the factors that drives Jenkins development.
β5. Availability of REST API
While working with Jenkins, you can use the REST API, which expands the capabilities of the system. The API for remote access to the system is presented in three versions: XML, JSON with JSONP support, Python. Here is a documentation page that reveals the details of working with the Jenkins REST API.
β6. Parallel task support
Jenkins supports parallelization of DevOps tasks. It can be easily integrated with related tools and be notified of task progress. Testing your code can be accelerated by organizing a parallel build of the project using different virtual machines.
β7. Support for working in distributed environments
Jenkins allows you to organize distributed builds using multiple computers. This feature is applicable in large projects and uses a work scheme, according to which there is one main Jenkins server and several slave machines. Slave machines can also be used in situations where you need to organize testing of a project in different environments. These capabilities distinguish Jenkins from other similar projects.
Introducing GitLab
GitLab CI / CD is one of the newest and most loved tools for DevOps engineers. This free open source tool is built into the GitLab version control system. The GitLab platform has a community version, it supports management of repositories, tools for tracking issues, organizing code reviews, mechanisms focused on creating documentation. Companies can install GitLab locally, linking it to Active Directory and LDAP servers for secure user authorization and authentication.
Here is a video tutorial to help you learn how to create CI / CD pipelines using the GitLab CI / CD features.
GitLab CI / CD was originally released as a standalone project, but in 2015 this toolkit was integrated into GitLab 8.0. A separate GitLab CI / CD server can support over 25,000 users. On the basis of such servers, you can create systems with high availability.
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 capabilities of CI / CD-tools, support additional capabilities, such as work scheduling.
It is very easy to integrate GitLab CI / CD into a project. When using GitLab CI / CD, the process of processing the project code is divided into stages, each of which can consist of several tasks performed in a specific order. Tasks lend themselves to fine tuning.
Tasks can run in parallel. After setting up the sequence of stages and tasks, the CI / CD pipeline is ready to go. Its progress can be monitored 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 around. The project is distinguished by high-quality documentation, its capabilities are easy and convenient to use. If you are not familiar with GitLab CI / CD yet, the following list of features of this tool will give you a general idea of ββwhat to expect from it. It should be noted that many of these features are related to the GitLab platform itself, into 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 gradually become an extremely popular CI / CD tool used for automated software testing and deployment. It's easy to customize. It is also a free CI / CD tool built into the GitLab platform.
β2. GitLab Pages and Jekyll support
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 source materials and generates a ready-made static site based on them. You can control the look and feel of these sites by editing the file
_config.yml
used by Jekyll.
β3. Project planning capabilities
The ability to plan project milestones makes it easier to track issues and problem groups. This allows you to manage the organization of work on projects, plan their implementation for a specific date.
β4. Automatic scaling of CI runners
Thanks to the automatic scaling of runners responsible for performing specific tasks, you can seriously save on the cost of renting server capacity. This is very important, especially when it comes to environments where projects are tested in parallel. It is also important for large projects with multiple repositories.
β5. Problem tracking tools
GitLab's powerful issue tracking capabilities have led to the platform being used by many open source projects. GitLab CI / CD allows parallel testing of different branches of code. It is convenient to analyze test results in the system interface. This makes GitLab CI / CD different 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 rights that correspond 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 easier to find answers to questions that arise when working with GitLab CI / CD.
β8. Support for working with various version control systems
GitLab CI / CD is a system that can work not only with the code placed in the GitLab repositories. For example, code can be stored in a GitHub repository, and a CI / CD pipeline can be organized over GitLab using GitLab CI / CD.
Jenkins vs GitLab CI / CD comparison
Jenkins and GitLab CI / CD are very good tools, each of which is capable of making the CI / CD pipeline work properly. But, if you compare them, it turns out that, although they are in many ways similar, they differ in some way from each other.
Characteristic | Jenkins | GitLab CI/CD |
. | , β GitLab. | |
. | . | |
. | . | |
β . | . | |
CI/CD- | , Jenkins Pipeline. | . |
. | . | |
1000 . | GitLab. | |
API | API. | API . |
JavaScript | . | . |
(Slack, GitHub). | Lots of tools for integration with third-party systems, in particular, with GitHub and Kubernetes. | |
Code quality control | Supported - with 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 about these differences will help to understand those who prefer one of these tools over the other.
- GitLab CI / CD has full control over Git repositories. We are talking about managing repository branches and some other features. But Jenkins, although it knows how to work with repositories, does not give the same level of control over them as GitLab CI / CD.
- Jenkins is a free open source project. Whoever chooses it unfolds it independently. And GitLab CI / CD is included in the GitLab platform, it is a ready-made solution.
- GitLab CI / CD supports advanced project-level task management. This side of Jenkins is less developed.
Jenkins and GitLab CI / CD: strengths and weaknesses
By now, you have some idea of ββJenkins and GitLab CI / CD. Now, to get you even better acquainted with these tools, let's look at their strengths and weaknesses. We assume that you have already made a decision about which tool you need. Hopefully, this section will allow you to test yourself.
β Jenkins Strengths
- A large number of plugins.
- Full control over the installation of the tool.
- Easy debugging of runners.
- Simple configuration of nodes.
- Easy code deployment.
- Very good credential management system.
- Flexibility and versatility.
- Support for various programming languages.
- The system is intuitive.
βWeaknesses of Jenkins
- .
- Jenkins , , .
- CI/CD-.
β GitLab CI/CD
- Docker.
- .
- , CI/CD-.
- .
- .
- .
- .
- .
β GitLab CI/CD
- / .
- .
- CI/CD- .
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 differs in certain peculiarities, although these tools have been created to solve the same problem. That being said, Jenkins is a standalone tool, while GitLab CI / CD is part of a code collaboration platform.
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 the DevOps engineers who support the project are used to working with.
What CI / CD tools do you use?