Skip to content
Latchkey

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.

Pipeline behavior
# 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

  1. Add a rules entry matching the merge request source to the relevant jobs.
  2. Or add merge requests to top-level workflow:rules.
  3. Re-open or update the MR and confirm a pipeline appears.
.gitlab-ci.yml
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.

.gitlab-ci.yml
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_event rules to jobs that should run on MRs.
  • Avoid workflow rules that silently exclude MR pipelines.

Related guides

Tired of flaky CI? Latchkey auto-heals failed jobs and retries them for you. Start free →