1. An integrated platform #
Code, CI/CD, security and deployment in one place.
Overview #
GitLab brings together in a single application the Git repository, merge requests, CI/CD, registries (containers, packages), security scans, environments and issue tracking. CI/CD is described in a .gitlab-ci.yml file at the root of the repository: every push or merge request triggers a pipeline.
| Concept | Definition |
|---|---|
| Pipeline | all jobs triggered by an event (push, merge request, schedule, API) |
| Stage | a step; stages run in sequence, jobs of the same stage run in parallel |
| Job | a sequence of commands (script) run by a runner, in an image |
| Runner | the agent that runs jobs: shared (GitLab.com) or self-hosted |
| Artefact | files produced by a job and kept (reports, binaries) |
2. Variables and context #
What each job knows about its run.
Predefined variables #
| Variable | Content |
|---|---|
| CI_COMMIT_SHA, CI_COMMIT_SHORT_SHA | commit identifier |
| CI_COMMIT_BRANCH, CI_DEFAULT_BRANCH | current branch, default branch |
| CI_PIPELINE_SOURCE | origin: push, merge_request_event, schedule, web… |
| CI_REGISTRY, CI_REGISTRY_IMAGE | project container registry |
| CI_JOB_TOKEN | temporary job token (registry, API, dependencies) |
| CI_ENVIRONMENT_NAME | deployment environment |
Your own variables are defined in the file, or in Settings › CI/CD › Variables for sensitive values: masked (hidden in logs) and protected (only available on protected branches and tags).
3. Editions and alternatives #
What is free, what is not.
Editions #
- GitLab.com (SaaS) or self-managed (free GitLab CE, EE); Free, Premium and Ultimate plans.
- On GitLab.com, shared runners consume compute minutes (400 per month on Free for private projects, to be checked); a self-hosted runner consumes none.
- Premium notably adds protected environments, deployment approvals and merge trains; Ultimate adds security dashboards and compliance.
Compared with other tools #
| Tool | Difference with GitLab CI |
|---|---|
| GitHub Actions | action ecosystem, triggered by GitHub events; paid advanced security |
| Azure DevOps | Microsoft suite (Boards, Repos, Pipelines), Azure integration |
| Jenkins | self-hosted, plugin-extensible, more operations work |
Commands to know #
Commands to know
glab ci lint: validate .gitlab-ci.ymlglab ci status: branch pipeline statusglab ci view: follow the pipeline liveglab ci trace <job>: job log
Sources #
Checked in November 2026: CI/CD platforms change every month, check versions and plans in the vendor's documentation.
My progress
Sign in to track your progress and take notes. Sign in
💬 Questions about this lesson
No questions yet: be the first to ask for help or share your configuration.
Recommended Articles
GitHub Actions: concepts and how it works
Discover GitHub Actions: events, workflows, jobs, steps and actions, the Marketplace, hosted runn...
Writing a .gitlab-ci.yml: jobs, rules, cache and artifacts
Mastering .gitlab-ci.yml syntax: stages, jobs and images, rules and workflow, needs (DAG), cache ...
GitLab runners: types, executors, installation and security
Running GitLab jobs: instance, group and project runners, docker, kubernetes and docker-autoscale...
End-to-end CI/CD (1/5): principles and anatomy of a pipeline
Understand end-to-end CI/CD: continuous integration, continuous delivery and continuous deploymen...
Reusing and securing GitLab pipelines
Industrializing GitLab CI/CD: extends, anchors and !reference, include, CI/CD components and cata...
End-to-end CI/CD (5/5): GitHub Actions, GitLab CI, Jenkins and Argo CD in practice
Compare and use CI/CD tools: GitHub Actions, GitLab CI, Jenkins, Argo CD and Flux; a complete pip...
k6 in continuous integration and on Kubernetes (k6-operator)
Automate performance tests: k6 in GitHub Actions and GitLab CI with blocking thresholds, distribu...
GitLab CI/CD best practices and troubleshooting
Running GitLab CI/CD day to day: speeding up pipelines, controlling compute minutes, organizing f...
Azure YAML pipelines: stages, tasks, variables and templates
Writing Azure pipelines in YAML: trigger and pr triggers, stages, jobs and steps, versioned tasks...