GitLab CI/CD — Intermediate
Dynamic Child Pipelines
A single monolithic .gitlab-ci.yml gets unwieldy fast for a monorepo with many independently-deployable services — every change to any service re-evaluates the entire pipeline definition. Child pipelines solve this by letting a job generate its own pipeline YAML at runtime and trigger it as a separate, nested pipeline:
strategy: depend matters — without it, the parent pipeline reports success the moment it triggers the child, regardless of whether the child pipeline itself later fails, which produces a misleadingly green parent pipeline for a deploy that actually broke.
Merge Trains
For a high-velocity repo where multiple merge requests land close together, merging them one at a time (each re-running the full pipeline against main before the next starts) is slow and serializes unnecessarily. A merge train queues approved MRs and tests each one as if the previous ones in the queue had already merged — catching integration conflicts between queued MRs before they actually merge, not after:
The practical value: two MRs that each pass CI individually but conflict when combined get caught by the train's speculative merge-and-test step, rather than discovered only after both are already on main.
Review Apps — Dynamic Environments per Merge Request
A review app spins up a genuinely deployed, live instance of the application for a specific merge request — reviewers can click a real link and interact with the actual change, not just read a diff:
on_stop wiring a dedicated cleanup job is what prevents review-app namespaces from accumulating indefinitely — without it, every MR leaves behind a running environment nobody tears down.
Parallel Matrix Jobs
Testing the same job across multiple parameter combinations (Node versions, target platforms) without hand-writing one job per combination:
CI/CD Variable Scoping in Depth
Beyond basic Protected/Masked flags, variables can be scoped to specific environments, which matters once staging and production share the same pipeline definition but need different secrets:
The common mistake this prevents: a single unscoped DEPLOY_TOKEN variable available to every environment means a staging deploy job could technically access production credentials if the pipeline definition ever changes — environment-scoped variables make that structurally impossible rather than relying on job authors being careful.

