GitLab CI

The integrated DevSecOps platform — SCM + CI + container registry + SAST/DAST + dependency scanning in one product. .gitlab-ci.yml stages, shared/group/specific runners, Auto DevOps, child pipelines, dynamic environments, OIDC to clouds.

Overview

GitLab CI and the integrated platform

GitLab CI is the CI half of the integrated GitLab DevSecOps platform: SCM, CI/CD, container registry, package registry, security scanning and issue tracking in one product. JetBrains 2024 DevEcosystem puts it at ~21% share, third behind GitHub Actions (~33%) and Jenkins (~28%).

The pieces connect in one line. Code and merge requests live in source control, and GitLab CI runs the pipeline that .gitlab-ci.yml describes. The pipeline pushes what it builds to the container and package registry, from which environments and deploys pull. In parallel, the pipeline runs SAST, DAST, SCA and secret detection, and their findings land in the vulnerability dashboard.

The pitch is integration. GHA couples CI tightly to GitHub, but you stitch in registry, scanning and deploy from third parties; GitLab gives the whole vertical stack from one vendor. For some orgs that is the right trade (one auth model, one billing relationship, one dashboard); for others it is lock-in or feature surface they don't need.

Key concepts

  • .gitlab-ci.yml structure
  • Workflow rules + duplicate pipeline problem
  • Runners + executors
  • Auto DevOps
  • OIDC to AWS / GCP / Azure
  • Recipe: monorepo with dynamic child pipelines
  • Recipe: review app per MR with stop environment
  • Recipe: merge train for high-traffic main
  • Recipe: matrix + parallel for cross-platform tests
  • Recipe: Compliance Pipelines for org-level governance

Interview questions

  • When does GitLab CI win over GitHub Actions?
  • Walk through the difference between branch pipeline, MR pipeline, merged-result pipeline, and merge train.
  • How do you build a monorepo CI in GitLab with dynamic child pipelines?
  • Walk through GitLab's integrated DevSecOps scanning — SAST, DAST, SCA, container, license.
  • How do GitLab runners scale on Kubernetes for a busy CI workload?
  • Quick-fire interview answers — GitLab CI essentials.

Sign up free to read the full topic

More DevOps topics

Start free on Cariara · Coding problems · System design studio