GitLab CI
Built-in CI/CD for GitLab — pipelines defined in `.gitlab-ci.yml` with stages, jobs, and runners.
Pricing
Freemium
Type
Automation
Languages
Yaml
// VERDICT
Reach for GitLab CI when your code is on GitLab and you want integrated CI/CD as part of one DevOps platform. Skip it when you're off GitLab or want a separate, SCM-agnostic CI.
Best for
CI/CD built into GitLab - .gitlab-ci.yml pipelines, integrated runners, and the wider GitLab DevOps platform, so source, CI and deployment live together.
Avoid when
You're not on GitLab, you want a self-hosted plugin server, or a dedicated SCM-agnostic CI.
CI/CD fit
Native GitLab CI/CD · .gitlab-ci.yml · shared + self-hosted runners
Languages
Yaml
Team fit
GitLab-based teams · Teams wanting an all-in-one DevOps platform · QA adding pipeline gates
Setup
Maintenance
Learning
Licence
// BEST FOR
- CI/CD integrated into the GitLab platform
- Pipelines defined in .gitlab-ci.yml
- Shared SaaS runners or self-hosted runners
- Running test stages and gating merge requests
- Built-in container registry and environments
- Source, CI and deploy in one place
// AVOID WHEN
- Your code isn't on GitLab
- A self-hosted plugin server is preferred (Jenkins)
- You want a dedicated SCM-agnostic CI
- You only need the simplest hosted CI
- Single-vendor lock-in is a concern
- Deep customisation beyond YAML is needed
// QUICK START
# .gitlab-ci.yml
stages: [test]
test: { stage: test, script: [ npm test ] } # gate merge requests on the pipeline// ALTERNATIVES TO CONSIDER
| Tool | Choose it when |
|---|---|
| GitHub Actions | Your code is on GitHub. |
| CircleCI | You want a dedicated cloud CI across SCMs. |
| Jenkins | You need a self-hosted, plugin-extensible server. |
// FEATURES
- Native to GitLab — no separate service
- Stages, jobs, and parallel matrix builds
- GitLab Runner for self-hosted execution
- Auto DevOps with sensible defaults
- Container registry, package registry, and artifacts integrated
- Merge request pipelines and review apps
// PROS
- Single platform for VCS, CI, registry, and security
- Self-hostable Community Edition
- Strong merge-request and review-app workflows
- Mature pipeline-as-code DSL
// CONS
- Best when you're already on GitLab
- Self-hosted Runner ops can be involved
- Advanced features behind paid Premium/Ultimate tiers
// EXAMPLE QA WORKFLOW
Add a .gitlab-ci.yml with stages and jobs
Use shared or self-hosted runners
Run build/test stages
Gate merge requests on the pipeline
Use environments and the registry for deploys
Maintain YAML and runners
// RELATED QA.CODES RESOURCES
Cheat sheets
Glossary
Practice
Interview