GitLab "jobs config should contain at least one visible job"
GitLab parsed .gitlab-ci.yml but resolved zero runnable jobs. Every job is hidden, only a template, or filtered out - so there is nothing for a pipeline to contain.
What this error means
Pipeline creation is refused with "jobs config should contain at least one visible job", even though the YAML is otherwise well-formed. No pipeline appears on the commit or merge request.
This GitLab CI configuration is invalid: jobs config should contain at least one visible jobCommon causes
Every job is dot-prefixed (hidden)
A job whose name begins with a dot (.build) is a hidden template and never runs on its own. If all jobs are hidden, none are visible.
All jobs filtered out by rules
When every job's rules/only/except evaluates false for the current ref, tag, or pipeline source, the resolved pipeline is empty and rejected.
How to fix it
Add a concrete job that consumes the template
- Keep shared keys in a dot-prefixed template, but add a real job that extends it.
- Confirm at least one job name has no leading dot.
- Re-validate in CI/CD - Editor; it should report the pipeline as valid.
.build_template:
script: make build
build:
extends: .build_template # a real, visible jobMake sure rules cover this pipeline
- Review each job's
rules/onlyagainst the branch, tag, and$CI_PIPELINE_SOURCE. - Add a fallback rule (for example
if: $CI_COMMIT_BRANCH) so normal pushes run something. - Preview the surviving jobs in the Pipeline Editor against your target ref.
How to prevent it
- Keep at least one always-on job such as a lint or smoke check.
- Reserve dot-prefixes strictly for templates, never for real work.
- Preview rule evaluation in the editor before merging rule changes.