GitLab CI "dependencies" Job Not Found / Wrong Stage
dependencies: controls which jobs’ artifacts a job downloads. It fails validation - or silently passes nothing - when a listed job is undefined, in a later stage, or has no artifacts.
What this error means
Either a hard config error naming an undefined dependency, or a job that runs but receives no files because the dependency it named produced or passed nothing.
This GitLab CI configuration is invalid:
'test' job: undefined dependency: 'biuld'Common causes
Dependency job undefined or misnamed
Each name in dependencies: must match a real job. A typo (biuld) or a removed job is an undefined dependency.
Dependency in a later stage
dependencies can only reference jobs from earlier stages. Listing a same- or later-stage job is invalid because its artifacts do not exist yet.
Listed job has no artifacts
If the named job never declares artifacts:paths, the consumer downloads nothing - no error, just empty inputs.
How to fix it
List real, earlier jobs that produce artifacts
test:
stage: test
dependencies:
- build # earlier stage, declares artifacts:paths
script: ./run-tests.sh dist/Prefer needs for clarity
- Use
needs:withartifacts: trueto both order jobs and pass artifacts. - Set
dependencies: []to explicitly download nothing when a job needs no inputs. - Confirm the producing job declares
artifacts:paths.
How to prevent it
- Keep
dependencies/needsjob names in sync during refactors. - Ensure any job named as a dependency declares artifacts.
- Prefer
needs:artifactsfor explicit data flow.