Skip to content
IT glossary
DevOps and cloudUpdated December 3, 2026

GitLab

A platform where teams host Git repositories, review proposed code changes, and automate tasks such as testing, building, and deploying software.

Also known as: GitLab CI, GitLab CI/CD, merge request в GitLab

What GitLab does

Git records the history of a codebase and lets developers work on separate branches. GitLab gives the team a shared place to host those branches, control access, and review changes. Its built-in CI/CD system can also test a change or build a release without someone running the commands by hand. Teams can use GitLab.com or operate their own GitLab Self-Managed instance.

From a branch to a merge

Suppose you fix a bug on a branch and push it to GitLab. You open a merge request (MR) to propose bringing that change into a target branch, usually main. Reviewers can inspect the diff and comment on specific lines. If you push a follow-up commit to the source branch, the same MR updates. An MR is the GitLab equivalent of a GitHub pull request. Opening one doesn't merge anything, and a passing pipeline doesn't automatically grant permission to merge. Teams can protect the target branch from direct pushes and require a successful pipeline before merging.

What runs the pipeline?

GitLab CI/CD is a feature of GitLab, not another name for the whole platform. By default, it reads .gitlab-ci.yml from the repository root. GitLab evaluates the configuration to decide whether to create a pipeline and which jobs to include. A GitLab Runner picks up an eligible job and executes its commands using an executor, such as Docker or the host shell. GitLab tracks the result and displays the job log.

Jobs in the same stage can run concurrently if there is runner capacity. In the default stage order, jobs in a later stage wait for the earlier stages to succeed. With needs, a job can depend on specific jobs instead of waiting for the entire preceding stage.

Example: run unit tests

unit_tests:
  stage: test
  image: node:22
  script:
    - npm ci
    - npm test

On a runner using the Docker executor, this job uses the node:22 container image. For a project with a package-lock.json and a configured test script, it installs dependencies and runs the tests. If npm test exits with a nonzero status, the job fails. This example doesn't deploy anything or configure a dedicated merge request pipeline. To create a pipeline for MR events, configure rules that match merge_request_event.

What interviewers ask

A common troubleshooting question is why a job is stuck in pending. Check whether a runner is online, has capacity, and is eligible for the job given its tags and access settings. If the job never appears in the first place, investigate the configuration: workflow: rules controls whether a pipeline is created, while job-level rules controls whether a particular job is included. Another common question is artifacts versus cache: use artifacts to keep or pass along job outputs such as test reports or compiled binaries; use a cache to speed up repeat work, without assuming a cache hit.