Skip to content
Latchkey

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.

Pipeline Editor
This GitLab CI configuration is invalid: jobs config should contain at least one visible job

Common 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.

.gitlab-ci.yml
.build_template:
  script: make build

build:
  extends: .build_template   # a real, visible job

Check your rules cover this pipeline

  1. Inspect each job’s rules/only against the current branch, tag, or pipeline source.
  2. Add a fallback rule (e.g. if: $CI_COMMIT_BRANCH) so something runs on normal pushes.
  3. 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.

Frequently asked questions

What causes ""at least one visible job""?
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.
How do I fix "at least one visible job"?
Hidden templates (.template) must be consumed by a real job via extends.

Related guides

References

Latchkey auto-heals failures like this one - detected, fixed, and retried without you. Start free → 30-day trial · No credit card