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.
This GitLab CI configuration is invalid: jobs config should contain at least one visible jobCommon 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
- Remove the leading dot from a job you intend to run, or add a real job that
extendsthe hidden one. - Re-run CI Lint to confirm a visible job now exists.
- Push and verify the pipeline creates.
# .build is a hidden template; add a visible job that uses it
.build:
script: make
build:
extends: .buildWiden 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.
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/rulesthat exclude every job.