Skip to content

GitLab CI

What It Is

CI/CD inside GitLab through .gitlab-ci.yml, runners, and environments.

Core Ideas

  • stages and jobs
  • shared and dedicated runners
  • variables and secrets
  • artifacts and cache

Minimal Example

stages:
  - test

test:
  stage: test
  script:
    - echo "run tests"

Practice

  • Keep cache and artifacts conceptually separate.
  • For deploy jobs, use explicit branch and environment restrictions.