First GitLab CI
CI hello world.
Overview
The first GitLab CI pipeline moves CI to the same surface as code. .gitlab-ci.yml in the repo is the first artifact; the patterns of stages, rules, DAG dependencies, and shared includes determine whether the pipeline scales beyond the first project.
- CI hello world.
.gitlab-ci.ymlin repo root; matches Git-driven development by living next to the code. - Stages and jobs. Build, test, deploy with dependencies; matches modern CI structure.
- Rules. Conditional execution via
rules:; the modern syntax that replacesonly/except. - needs for DAG plus includes. Skip stage gates where appropriate;
include:for reuse across repos.
The approach
The practical approach: .gitlab-ci.yml committed in repo, rules: for conditional execution, needs: for DAG parallelism, include: for reuse, documented pipeline structure. The team’s discipline produces predictable CI rather than yaml sprawl.
- .gitlab-ci.yml in repo. Pipeline lives with code; matches Git workflow and code review.
- rules: instead of only/except. Modern syntax; the right default for current GitLab.
- needs: for DAG. Skip stage gates where dependencies allow; supports parallel execution.
- include: for reuse plus documented pipeline. Per-team pipeline templates; per-project structure documented for adoption.
Why this compounds
GitLab CI discipline compounds across projects. Each pipeline pattern captured grows the team’s automation; new projects inherit the templates rather than starting from scratch.
- Faster pipelines.
needs:-based DAG produces fast results; supports velocity by removing artificial sequencing. - Better reuse.
include:captures conventions; the team library compounds. - Better integration. Native GitLab MR integration; supports developer experience without external glue.
- Institutional knowledge. Each pipeline teaches CI patterns; the team’s release engineering muscle grows.
GitLab CI fluency is an engineering discipline that pays off across years. Nova AI Ops integrates with CI telemetry, surfaces patterns, and supports the team’s release engineering discipline.