
Many teams end up with a toolchain stitched together from separate products: one for source code, one for issues, one for CI, one for the container registry, another for security scans. Each link needs its own accounts, permissions and integrations, and nobody sees the whole path from a commit to production in one place. GitLab CI/CD takes the opposite approach. The pipeline is part of the same platform that holds the code, the merge requests, the registry and the deployment history.
This article explains what GitLab CI/CD is, how pipelines and runners work, where it fits, where it does not, and how it compares with the other common CI/CD tools.
What is GitLab CI/CD?
GitLab CI/CD is the continuous integration and continuous delivery system built into GitLab. You define a pipeline in a .gitlab-ci.yml file at the root of the repository, and GitLab runs its jobs on machines called runners every time code is pushed, a merge request is opened, a tag is created or a schedule fires.
GitLab itself was created in 2011 by Dmytro Zaporozhets as an open-source, self-hosted alternative for managing Git repositories. Continuous integration first existed as a separate application, GitLab CI. With GitLab 8.0, released on 22 September 2015, CI was merged into GitLab itself, so pipelines, code and merge requests now lived in one product. The same year, a Go-based runner that Kamil Trzciński had started as an unofficial project became GitLab Runner, the agent that still executes jobs today.
GitLab is available in three forms: GitLab.com as a hosted service, GitLab Self-Managed on your own servers, and GitLab Dedicated, a single-tenant hosted instance. The core is open source; paid tiers add features such as advanced security scanning, compliance controls and merge trains.
How GitLab CI/CD works
The pipeline file. .gitlab-ci.yml lists jobs and the stages they belong to, for example build, test and deploy. Jobs in the same stage run in parallel; the next stage starts when the previous one succeeds. With the needs keyword, jobs can also form a directed graph and start as soon as their own dependencies finish.
Runners execute jobs. GitLab coordinates the pipeline but does not run the scripts itself. It hands each job to a runner, a lightweight agent installed on a server, a virtual machine or a Kubernetes cluster. A runner uses an executor to decide how the job runs: directly in a shell, inside a Docker container, or as a Kubernetes pod. GitLab.com offers hosted runners; self-managed teams register their own.
Rules decide what runs. rules and workflow conditions control which jobs run for a branch, a merge request, a tag or a change to particular files, so a documentation change does not rebuild the whole system.
Artifacts, caches and environments. Jobs pass build outputs to later jobs as artifacts, reuse dependencies through caches, and record deployments to named environments such as staging and production, with a history of what was deployed where and when.
Key features
- Merge request pipelines that show build, test and scan results directly in the merge request.
- Reusable configuration:
includefor shared templates, CI/CD components published in the CI/CD Catalog, and parent-child pipelines for monorepos. - CI/CD variables at project, group and instance level, with protected and masked variables for secrets.
- Environments and review apps: a temporary deployment per merge request so reviewers can see the change running.
- Built-in registries for container images and packages, close to the pipelines that produce them.
- Security scanning such as SAST, dependency and container scanning, with the most advanced reports in paid tiers.
- Kubernetes integration through the GitLab agent for Kubernetes, for pull-based or pipeline-driven deployments.
Where GitLab CI/CD is used
- Organisations that self-host their code, for example in regulated industries, where source code, pipelines and artefacts must stay on their own infrastructure.
- Platform teams that publish shared pipeline templates and components for many product teams.
- Monorepos that need parent-child pipelines and path-based rules to build only what changed.
- Container and Kubernetes delivery: building images, scanning them, pushing them to the built-in registry and releasing with Helm.
- Infrastructure as code pipelines for Terraform or Ansible, with plan output reviewed in the merge request.
When to choose GitLab CI/CD, and when not to
Choose GitLab CI/CD when:
- Your code is on GitLab, or you want one platform for code, CI/CD, registry and deployment tracking.
- You need to run the entire toolchain on your own servers, including in networks without internet access.
- Governance matters: you want protected environments, approvals and an audit trail of deployments in the same place as the code review.
- Many teams should share standardised pipeline building blocks.
Think twice when:
- Your repositories are on GitHub or Bitbucket. GitHub Actions or Bitbucket Pipelines integrate more naturally there, and mirroring code just to use GitLab pipelines adds moving parts.
- You only need a small CI setup. Running a self-managed GitLab instance is a real operational commitment: upgrades, backups, runners and storage.
- The features you count on, such as merge trains or the most advanced security reports, are in paid tiers you have not planned for.
- Pipelines have to orchestrate many unrelated systems outside the repository. A general automation server such as Jenkins can be more flexible for that.
GitLab CI/CD and its alternatives
| Tool | Hosting | Strength | Best fit |
|---|---|---|---|
| GitLab CI/CD | GitLab.com, self-managed, Dedicated | One platform from code to deployment | GitLab users, self-hosted DevOps |
| GitHub Actions | GitHub, with self-hosted runners | Large marketplace of reusable actions | Teams whose code is on GitHub |
| Bitbucket Pipelines | Atlassian cloud, self-hosted runners | Tight Jira and Bitbucket integration | Atlassian-centred teams |
| Jenkins | Your own servers | Plugins and full control | Complex, on-premise or legacy pipelines |
The most common comparison is with GitHub Actions. Both define pipelines in YAML next to the code and both can run jobs on your own machines. GitLab's advantage is the integrated platform, especially when it is self-hosted; GitHub's is the size of its community and action marketplace. Jenkins is a different kind of tool: an automation server you install and extend with plugins. We cover that comparison in detail in our Jenkins article, and the reasoning behind CI/CD itself in DevOps and CI/CD: continuous improvement in software development.
How we use GitLab CI/CD at Internative
We use GitLab CI/CD on projects that need tightly integrated DevOps workflows and self-hosted control. Its broad feature set lets us run complex delivery pipelines with clear visibility and governance over what is built, tested and deployed.
If you are planning a self-hosted delivery platform or want to bring order to existing GitLab pipelines, our DevOps services team can help you set it up.
Frequently asked questions
What is GitLab CI/CD used for?
It automates building, testing and deploying code stored in GitLab. Typical pipelines compile the application, run tests and security scans, build a container image, push it to a registry and deploy it to staging or production, all triggered by pushes, merge requests or tags.
What is a CI/CD pipeline in simple words?
A pipeline is the automated path a code change takes from a commit to a running application. It is split into steps, such as build, test and deploy, that run in order. If a step fails, the pipeline stops, so a broken change does not reach users.
Is GitLab just like GitHub?
Both host Git repositories and offer code review, issues and CI/CD. GitLab puts more of the delivery toolchain into one product and is widely self-hosted; GitHub has the larger open-source community and a large marketplace of reusable actions. Their pipeline features are close, but the files and terminology differ.
Where do you set CI/CD variables in GitLab?
In the project's Settings, under CI/CD and then Variables. Variables can also be defined at group or instance level, or directly in .gitlab-ci.yml. Secrets should be added in the settings and marked as protected and masked, not written into the file.
Can I run GitLab CI locally?
You can install GitLab Runner on your own machine and register it with a project, so jobs execute locally while GitLab still coordinates the pipeline. For quick feedback before pushing, many teams also run the same commands the job uses in a local container.
Keep reading
The articles that follow this one.



