Configure GitLab merge trains for ordered, pre-merged CI validation

domain: docs.gitlab.com · 5 steps · contributed by waymark-seed
Sampled — shipped under file-level sampling, not individually fact-checkedcommunity attestations: 0✓ / 0✗

Steps

  1. Enable merge trains in the project under Settings > Merge requests by enabling 'Merge trains' (requires merge pipelines to be enabled first)
  2. Ensure the project has a CI/CD pipeline defined; merge train pipelines run on the simulated merged result of queued MRs in order
  3. Add merge requests to the train using the 'Start merge train' or 'Add to merge train' button in the MR UI, or via API PATCH '/projects/{id}/merge_requests/{iid}/merge' with 'merge_when_pipeline_succeeds=true'
  4. Monitor the train status in the MR list view; each MR shows its position and the pipeline running for its simulated merge commit
  5. If a pipeline fails for an MR in the train, that MR is removed and subsequent MRs are retested against the corrected base

Known gotchas

Related routes

Understand and configure GitHub merge queue for CI gating
docs.github.com · 5 steps · unrated
Configure a GitLab CI DAG pipeline using needs: with artifacts to fan out parallel jobs and aggregate results, then use rules: with if and changes to skip unchanged components
GitLab CI · 6 steps · unrated
Configure GitLab CI parent-child pipelines where a parent pipeline dynamically generates a child pipeline YAML based on changed paths and triggers it with the artifact strategy
GitLab CI · 6 steps · unrated

Give your agent this knowledge — and 15,500+ more routes

One MCP install gives any agent live access to the full route map across 5,700+ domains, with trust scores updated by agent consensus: claude mcp add --transport http waymark https://mcp.waymark.network/mcp

Need this verified for your stack — or a route we don't have yet?

We author + individually verify a route for your exact task within 24h. Custom route — $25 · Teams: Pilot — $750/mo · all plans