GitLab CI merge request pipeline not created in CI
No pipeline appears on a merge request because no job opts into the merge_request_event source, or top-level workflow:rules excludes it. GitLab will not create an MR pipeline unless at least one job matches that event.
What this error means
The merge request shows no pipeline, or only branch pipelines run. The MR widget reads "No pipeline" even though branch pushes do trigger pipelines.
# Symptom: branch pipelines run, but the MR shows "No pipeline".
# No job (and no workflow rule) matches CI_PIPELINE_SOURCE == "merge_request_event".Common causes
No job targets merge_request_event
Jobs only match push events, so opening or updating a merge request creates no pipeline.
workflow:rules drops MR pipelines
A top-level workflow:rules that only allows branch pushes prevents any merge request pipeline from being created.
How to fix it
Add a rule for merge_request_event
- Add a
rulesentry matching the merge request source to the relevant jobs. - Or add merge requests to top-level
workflow:rules. - Re-open or update the MR and confirm a pipeline appears.
test:
script: pytest
rules:
- if: '$CI_PIPELINE_SOURCE == "merge_request_event"'Allow MR pipelines in workflow:rules
Use the recommended workflow that enables both merge request and branch pipelines without duplication.
workflow:
rules:
- if: '$CI_PIPELINE_SOURCE == "merge_request_event"'
- if: '$CI_COMMIT_BRANCH'How to prevent it
- Decide branch vs merge request pipeline strategy explicitly in workflow rules.
- Add
merge_request_eventrules to jobs that should run on MRs. - Avoid workflow rules that silently exclude MR pipelines.