# GitLab CI/CD

> The CI/CD tool built into GitLab. You set it up in a .gitlab-ci.yml file.

**Field:** Software Development  
**Category:** DevOps & Cloud  
**Also known as:** GitLab CI, .gitlab-ci.yml, GitLab Pipelines

## Think of it like

Think of it like a to-do list kept in the project folder. GitLab reads it and does each task when code changes.

## Definition

GitLab CI/CD is the pipeline tool built into GitLab. You describe the pipeline in a file called .gitlab-ci.yml, in the root of the project. The file lists stages and the jobs in each. Runners pick up the jobs and run them. Results show next to each merge request.

## Example

Lucy adds a .gitlab-ci.yml with a test job. Every merge request now shows a green tick or a red cross.

## Example code

```yaml
test:
  image: node:22
  script:
    - npm ci
    - npm test
```

One job that installs packages and runs the tests on each push.

## Why it matters

Code, reviews and pipelines live in one place, so teams need one tool, not three.

## Common mistake

Saving the file with the wrong name. GitLab looks for .gitlab-ci.yml, unless you pick a new name in the settings.

## Three principles

- **One file.** .gitlab-ci.yml in the project root.
- **Stages and jobs.** Jobs run inside stages.
- **Runners run it.** Hosted or your own.

## Related terms

- [GitLab](https://learn.benibix.com/term/development/gitlab)
- [CI/CD Pipeline](https://learn.benibix.com/term/development/ci-cd-pipeline)
- [GitHub Actions](https://learn.benibix.com/term/development/github-actions)
- [Pipeline Stage](https://learn.benibix.com/term/development/pipeline-stage)
- [CI Runner](https://learn.benibix.com/term/development/ci-runner)

![A pipeline drawn as three stages in a row: build, test and deploy. Each stage holds jobs, like compile, unit tests and lint, and the jobs in one stage run side by side. A runner, lit up, is the machine that picks up each job and runs it. Below, the same pipeline is shown as three config files: .github/workflows for GitHub Actions, .gitlab-ci.yml for GitLab CI/CD and a Jenkinsfile for Jenkins.](https://learn.benibix.com/diagrams/dev3-pipeline-stages.svg)

---

Source: https://learn.benibix.com/term/development/gitlab-ci-cd
Author: Behnia Zarei (a developer in Vienna, Austria, who builds and teaches data, AI and business intelligence at BENIBIX)
Publisher: BENIBIX Learn (https://learn.benibix.com/)
Last updated: 2026-11-18
Licence: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Quote freely with attribution.
