DevOps & CI/CD Deep Dive · 2 of 18

GitLab CI — One Platform, End to End

GitLab shipped CI in 2015 and made it the centerpiece of the product. Pipelines, container registry, environments, security scans, and the issue tracker share one UI and one auth model. Popular with teams that want a single self-hosted DevOps platform — and with companies who can't put code on third-party SaaS.

.gitlab-ci.ymlStagesAuto DevOpsSelf-hosted runnersSAST/DAST
← Back to DevOps & CI/CD
Anatomy

How a Pipeline Runs

Basic Concepts

  • Pipeline — defined in .gitlab-ci.yml at repo root.
  • Stages — ordered groups (build → test → deploy); jobs in a stage run in parallel.
  • Jobs — picked up by runners (shared SaaS, group, or self-hosted via the gitlab-runner agent).
  • Rules / only / except — gate jobs by branch, tag, file changes, MR target.
  • Environments — first-class concept: track which commit is on staging vs prod, with one-click rollback.
  • Includes & templatesinclude: from other repos or built-in templates (Auto DevOps, language-specific).
All-In-One

Why Teams Pick GitLab CI

  • Container registry built in. No need for Docker Hub or ECR; $CI_REGISTRY_IMAGE is just there.
  • Security scans included. SAST, DAST, dependency scanning, license compliance — flip on, get JSON in the MR view.
  • Review apps — spin up an ephemeral env per MR for designers/PMs to click through.
  • Self-hosted is first class — many regulated/on-prem teams adopt GitLab specifically because the SaaS path is optional.
  • Auto DevOps — opinionated default pipeline that builds, tests, scans and deploys to Kubernetes with zero config.
Tradeoffs

What to Watch Out For

  • Smaller marketplace than Actions — you'll write more shell yourself.
  • Self-hosted ops cost. The runner agent, registry, and database don't run themselves.
  • Tier gating. Many shiny features (compliance, advanced security) are locked behind Premium/Ultimate.
  • YAML can sprawl for multi-service monorepos — parent-child pipelines and include: help, but learning curve is real.
Continue

Other DevOps & CI/CD Tools