Skip to content
Latchkey

GitLab CI "jobs config should contain at least one visible job" in CI

GitLab validated .gitlab-ci.yml and found no runnable job: every entry is either hidden (a name starting with a dot), a reserved keyword, or filtered out by rules/only. A pipeline needs at least one visible job.

What this error means

The pipeline fails to create with "jobs config should contain at least one visible job". CI Lint reports the same message even though the file has job definitions.

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

Common causes

Every job name starts with a dot

Names like .build are hidden templates meant for extends. If all jobs are hidden, GitLab sees zero visible jobs to run.

All jobs are excluded by rules for this event

If each job's rules/only evaluates to false for the current branch or pipeline source, nothing remains visible.

How to fix it

Give at least one job a visible name

  1. Remove the leading dot from a job you intend to run, or add a real job that extends the hidden one.
  2. Re-run CI Lint to confirm a visible job now exists.
  3. Push and verify the pipeline creates.
.gitlab-ci.yml
# .build is a hidden template; add a visible job that uses it
.build:
  script: make

build:
  extends: .build

Widen the rules so a job matches

Confirm at least one job has a rules clause that evaluates true for the branch or event you are pushing.

.gitlab-ci.yml
test:
  script: pytest
  rules:
    - if: '$CI_PIPELINE_SOURCE == "push"'

How to prevent it

  • Keep hidden templates (dot-prefixed) separate from at least one visible job.
  • Validate rule coverage in CI Lint before pushing.
  • Avoid over-restrictive only/rules that exclude every job.

Related guides

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