Evaluate Weigh the pros and cons of technologies, products and projects you are considering.

5 advantages of GitLab CI/CD pipelines

Many CI/CD systems tools offer features like source control, build artifact and deployment capabilities to development and DevOps teams. GitLab is one of them, but the product brings certain advantages for CI/CD pipelines, from easy installation to advanced automation. The web-based tool encourages proper code practices within the team and safe deployment to production.

Companies in the market for a DevOps lifecycle tool should evaluate GitLab CI/CD pipelines on these five areas:

  • ease of configuration;
  • source code security;
  • pipeline automation;
  • DevOps maturity feedback; and
  • deployment scheduling.

1. Ease of configuration

Server configuration can be cumbersome in CI/CD tools. With some products, the IT organization cannot install the tool in a cloud provider or on premises unless the enterprise pays a large premium.

You can install the GitLab CI/CD tool anywhere: on premises, in the cloud, on a container, on almost any Linux distribution and you can even orchestrate the process in Kubernetes.

In this video, follow along to quickly deploy any version of the GitLab server through the Microsoft Azure portal. Users can create a virtual machine or follow a preset configuration. Here, we set up a GitLab Community Edition server in a resource group, choose a region of Azure to deploy to and select the right size instance. Aim for an instance with at least 4 CPUs and 7 GB RAM. This video demonstrates a GitLab Community Edition server with a password; SSH public key is also an option.

GitLab server setup shown in Microsoft Azure portal.
Set up a GitLab server via a preset template or create your own, as shown here.

Prefer a command-line interface (CLI) over a GUI? You can also install GitLab from the CLI. These four steps set up a GitLab server through the Ubuntu CLI:

  1. sudo apt-get update sudo apt-get install -y curl openssh-server ca-certificates
  2. sudo apt-get install -y postfix
  3. curl https://packages.gitlab.com/install/repositories/gitlab/gitlab-ee/script.deb.sh | sudo bash
  4. apt-get install gitlab-ee

2. Source code security

Security and compliance are important considerations for a CI/CD pipeline. Security should entail control over where code lives, and who can access it.

The GitLab platform includes a full distributed version control system platform; many CI/CD platforms, after all, build in source control. GitLab also offers full control over access control and the code storage location. For example, if you deploy GitLab on premises, you already manage what server or servers host the platform, and where code resides. IT organizations held to high security standards, such as government agencies, prefer this route.

You can store external code in GitLab repositories without leaving the GitLab UI, as in this Terraform code example:

TerraformDeploy source code in the GitLab GUI.
From the GitLab GUI, an administrator can add external code, such as TerraformDeploy.

Watch the demonstration in the video to see how to add code via the New Project field. Users can import projects from other source control repositories and decide if the project is private, internally shared or public. Clone the code or use GitLab's Web IDE to write new code.

3. Pipeline automation

GitLab includes a feature called Auto DevOps that can automatically detect, build, test, deploy and monitor applications via the CI/CD pipeline. The functionality encompasses everything developers want to do, or are already doing, with automation. Auto DevOps saves time and enforces standard practices, as teams don't perform manual setup for those steps. GitLab enables the feature by default for all projects.

To reap the benefits of Auto DevOps, users must integrate a Kubernetes cluster into GitLab. Here are two ways to implement Kubernetes in GitLab:

  • Bring your own cluster. Enter the information for an existing Kubernetes cluster into the platform. This method requires the cluster name, API URL, certification information and service token.
  • Create a cluster. Via the GitLab UI, create a Kubernetes cluster from either Amazon Elastic Kubernetes Service (EKS) or Google Kubernetes Engine (GKE). To use EKS or GKE, authenticate to the selected cloud service provider from GitLab.
Kubernetes cluster for GitLab Auto DevOps.
Create a Kubernetes cluster from the GitLab UI to enable Auto DevOps.

4. DevOps maturity feedback

DevOps implementation gets confusing quickly in the real world. GitLab offers users a score based on how they implement the CI/CD pipeline tool for DevOps. That score helps teams gauge, for example, where to extend DevOps capabilities and if developers are making appropriate use of a GitLab feature.

Suggestions can include areas outside of the GitLab CI/CD pipeline as well, such as Issue Boards for ticketing. When a development team uses these boards for a CI/CD pipeline, it ensures the team ships the correct software, fixes bugs and accounts for proper implementations prior to the start of the process.

GitLab users can compare their activities with other organizations, and access learning materials designed to improve DevOps implementation. These functionalities are particularly useful for small or isolated IT teams that don't have shared expertise with colleagues.

DevOps score on GitLab.
The example DevOps score shown here takes into account team-member activities, such as comments and merge requests.

Give GitLab time to develop a score based on activity. Within a week or two, GitLab's Analytics workspace will have enough information to generate a score.

5. Deployment scheduling

In a pure CI/CD pipeline, once code enters source control, it gets pushed to the CI process, which eventually kicks off the CD process to deploy the code. But, in a working enterprise production environment, the IT team might need to schedule releases to avoid conflicts, or ensure support staff can monitor for acceptable performance. For example, operations might specify that code deploys every day at 4 a.m., when user load is the lightest.

With GitLab's CI/CD pipeline schedules, you can specify a time for a specific branch to deploy. You can set an automatic schedule for a specific time in the future, or repeatedly for as long as you wish.

An example GitLab pipeline schedule.
GitLab pipeline schedules give IT organizations control over the CI/CD process.

When you set a deployment time, the dev team knows when code changes. Software development and user acceptance testing, in particular, benefit from these scheduled deployments. In addition, the operations team knows when to expect a new release, and monitors whether that code helps -- or breaks -- an implementation. This advance coordination pays off in instant root cause analysis.

View All Videos