# GitLab CI: No pipeline created — pipeline filtered out by workflow:rules / "The rules configuration prevented any jobs from being added to the pipeline"

**Code:** `Pipeline filtered out by workflow:rules` · **Category:** CI/CD · **Seen on:** GitLab CI

Your `workflow:rules` or job-level `rules:` evaluated to "never" for this event, so GitLab created no pipeline or no jobs.

## Meaning

Rules are evaluated top to bottom and the first match wins; if nothing matches the default is "never" for jobs with rules. Merge request pipelines need `$CI_PIPELINE_SOURCE == "merge_request_event"`; branch pipelines need `$CI_COMMIT_BRANCH`. Combine them carefully to avoid duplicate pipelines.

## Common causes

- No rule matches the event (push vs merge request vs schedule)
- Rules mix `only/except` and `rules`
- Variable name typo (`$CI_COMMIT_BRANCH`)
- All jobs have `when: never` for this case
- Tag pipelines missing `$CI_COMMIT_TAG` rule

## Quick fix

1. Add an explicit rule for every event you need
2. Debug with `CI/CD → Editor → Validate pipeline source`
3. Use `workflow:rules` to prevent duplicates

## Detailed fix by platform

### GitLab CI

1. Echo variables in a debug job: `script: - env | grep CI_` to see what is available

## Code examples

### Branch and merge request pipelines

```yaml
workflow:
  rules:
    - if: $CI_PIPELINE_SOURCE == "merge_request_event"
    - if: $CI_COMMIT_BRANCH && $CI_OPEN_MERGE_REQUESTS
      when: never
    - if: $CI_COMMIT_BRANCH
```

## How to diagnose

1. **Event** — Push, MR, tag or schedule?
2. **Rules** — Does any rule match?
3. **Variables** — Correct names?

---
Source: [WhatIsMyError](https://whatismyerror.com/errors/cicd/gitlab-pipeline-filtered-out-rules)
