Generate GitLab CI pipeline configurations with stages and jobs. Part of the DevTools Surf developer suite. Browse more tools in the DevOps / CI-CD collection.
Use Cases
Generate multi-stage pipelines (build → test → deploy) with environment-specific deployment gates.
Create pipelines with parallel test matrix jobs for multiple language versions or databases.
Set up scheduled pipeline triggers for nightly builds or weekly security scans.
Generate include directives to split a large .gitlab-ci.yml into per-team component files.
Tips
Use 'extends:' to inherit job templates and keep stage definitions DRY across a large .gitlab-ci.yml.
Set 'interruptible: true' on long jobs so GitLab cancels redundant pipeline runs when a new push arrives on the same branch.
Use 'rules:' instead of deprecated 'only:/except:' — rules give finer control over when jobs trigger and support complex boolean expressions.
Fun Facts
GitLab CI was introduced in GitLab 8.0 in 2015, making it the first major git hosting platform to bundle CI/CD natively — GitHub Actions didn't arrive until 2018.
GitLab's YAML configuration format supports anchors (&) and merge keys (<<: *) from the YAML 1.1 spec, which let developers share job templates without GitLab-specific 'extends:' — a trick predating the extends keyword by several years.
GitLab Runners, the agents that execute CI jobs, support over 10 executor types including Docker, Kubernetes, shell, and VirtualBox, giving more flexibility than GitHub's hosted runners.
FAQ
What's the difference between stages and jobs?
Stages define the execution order (build runs before test, test before deploy). Jobs are the actual tasks. Multiple jobs in the same stage run in parallel.
How do I pass artifacts between stages?
Use 'artifacts: paths:' in the producing job and 'dependencies:' or 'needs:' in the consuming job. Artifacts are stored on the GitLab server and downloaded automatically.
Does it support GitLab's Dynamic Child Pipelines?
Yes — the generator can create a parent pipeline that triggers child pipelines from generated YAML, a pattern used for large monorepos to run only affected service pipelines.