GitLab "jobs config should contain at least one visible job"
GitLab parsed your config successfully but found nothing to actually run. Every job is either hidden, a template, or excluded by its rules/only conditions for this pipeline.
What this error means
The config is otherwise valid, yet pipeline creation fails with "jobs config should contain at least one visible job", or an MR shows no pipeline at all because every job was filtered out.
This GitLab CI configuration is invalid: jobs config should contain at least one visible jobCommon causes
Every job is dot-prefixed (hidden)
A job name starting with a dot (.build) is a hidden template, never executed. If all jobs are hidden, there is nothing visible to run.
All jobs filtered out by rules/only
If every job’s rules or only/except evaluates to false for the current branch, tag, or event, the resulting pipeline is empty and GitLab rejects it.
How to fix it
Make at least one job concrete
Hidden templates (.template) must be consumed by a real job via extends.
.build_template:
script: make build
build:
extends: .build_template # a real, visible jobCheck your rules cover this pipeline
- Inspect each job’s
rules/onlyagainst the current branch, tag, or pipeline source. - Add a fallback rule (e.g.
if: $CI_COMMIT_BRANCH) so something runs on normal pushes. - Use the Pipeline Editor "Validate" tab with a target ref to preview which jobs survive.
How to prevent it
- Keep at least one job that always runs (e.g. a lint or smoke job).
- Reserve dot-prefixes strictly for templates, not real work.
- Preview rule evaluation in the editor before merging rule changes.