GitLab: two pipelines run on every push
The warning Job may allow multiple pipelines to run for a single action appears when a job uses rules with a when clause and no if. Usually it means that pushing a commit to a branch with an open merge request starts two pipelines, a branch pipeline and a merge request pipeline (GitLab docs: debugging CI/CD pipelines and job rules, checked November 19, 2026).
Where the warning shows
Pipeline configuration warnings appear when you validate the configuration with the CI Lint tool or run a pipeline manually.
To see the error next to the pipeline that failed: Pipelines and Jobs Inbox for GitLab CI, a plugin for JetBrains IDEs, shows under a pipeline that failed before any job ran the messages GitLab gives, such as a configuration error.
Why you get two pipelines
job:
script: echo "This job creates double pipelines!"
rules:
- if: $CUSTOM_VARIABLE == "false"
when: never
- when: always
This job does not run when $CUSTOM_VARIABLE is false, but it runs in every other pipeline, branch (push) and merge request pipelines alike. With a rule list that ends in when: always, every push to the source branch of an open merge request makes both. A list with an if for push and another for merge_request_event does the same.
Fix
- Use
workflow:rulesto say which pipeline types may exist. GitLab's example runs a branch pipeline until a merge request opens, then only the merge request pipeline:
workflow:
rules:
- if: $CI_PIPELINE_SOURCE == "merge_request_event"
- if: $CI_COMMIT_BRANCH && $CI_OPEN_MERGE_REQUESTS
when: never
- if: $CI_COMMIT_BRANCH
- Or rewrite the job's rules to cover one case only and leave out the final
whenrule, for example- if: $CUSTOM_VARIABLE == "true" && $CI_PIPELINE_SOURCE == "merge_request_event". - Do not mix jobs with
only/exceptand jobs withrulesin one pipeline. It may raise no error, but their defaults differ and the result is hard to troubleshoot.
Duplicates also affect the merge check: with Pipelines must succeed on, merge request pipelines take precedence, see the pipeline that never comes.
GitLab pipelines in IntelliJ IDEA
Pipelines and Jobs Inbox for GitLab CI, a plugin by Lesstep for JetBrains IDEs 2024.1 or later, lists the pipelines of your GitLab projects with a row for each, showing how it started (schedule, web, merge request) and the branch or merge request, so two pipelines for one push are easy to tell apart. It also shows YAML errors as GitLab reports them, and you can run a new pipeline on a branch from the IDE (Pro). Reading is free; retrying, cancelling and running are Pro (US$1.50 a month, with a 30-day trial).
Get it on JetBrains Marketplace
GITLAB is a trademark of GitLab Inc.; IntelliJ IDEA is a trademark of JetBrains s.r.o. This page is not affiliated with or endorsed by GitLab Inc. or JetBrains.
More: GitLab "This GitLab CI configuration is invalid" in rules:if · GitLab pipeline failed with no jobs · GitLab "config contains unknown keys" · GitLab pipeline or job refused (400, 403, 409, 429)