Compose a clean .gitlab-ci.yml without fighting YAML indentation. Pick a default image, stages, caches, services, and add jobs with scripts, rules, artifacts, and a parallel matrix — the YAML on the right updates as you type. Output uses GitLab’s current keyword spelling (rules, parallel:matrix, artifacts:reports) so you can paste it straight into a project.
GitLab CI/CD reads a single .gitlab-ci.yml at the repo root. The file declares ordered stages
and a flat list of jobs, each pinned to a stage and runner image. Modern keys you almost always want:
rules (not only/except), artifacts with reports:junit for test
visibility, parallel:matrix for fan-out, and an explicit workflow: block so merge-request
pipelines and push pipelines don’t duplicate. This builder spits out a baseline matching those conventions —
tune per-job script and rules, then paste into your project.