CI job ignores dependencies if previous job has only.changes: ['path'] configuration
Summary
CI ignores dependencies if previous job is not run. (for example only.changes is configured)
Steps to reproduce
gitlab-ci.yml
---
stages:
- stage1
- stage2
stage1:
stage: stage1
script:
- echo AAA > BINARY
artifacts:
paths:
- BINARY
expire_in: "1 day"
only:
changes:
- TRIGGER
stage2:
stage: stage2
script:
- cat BINARY
dependencies:
- stage1
Actual behavior
Stage 2 failed because there are no artifacts
Expected behavior
Stage 2 should download artifact from previous pipelines. This should not a problem because on new branches every job is run by default and produce artefacts. https://docs.gitlab.com/ee/ci/yaml/#using-changes-with-new-branches-and-tags
Relevant logs and/or screenshots
Running with gitlab-runner 11.5.0 (3afdaba6)
on build01 d0f6f51a
Using Docker executor with image docker:stable ...
Pulling docker image docker:stable ...
Using docker image sha256:062267097b77e3ecf374b437e93fefe2bbb2897da989f930e4750752ddfc822a for docker:stable ...
Running on runner-d0f6f51a-project-1602-concurrent-0 via build01.eu-central-1.compute.internal...
Fetching changes...
Removing BINARY
HEAD is now at 6c5e045 Add CI
From https://git.example.com/jkr/only-changes-dependencies
6c5e045..0eb765e master -> origin/master
Checking out 0eb765ed as master...
Skipping Git submodules setup
$ cat BINARY
cat: can't open 'BINARY': No such file or directory
ERROR: Job failed: exit code 1
Environment description
Docker executer on Gitlab 11.5
Used GitLab Runner version
Running with gitlab-runner 11.5.0 (3afdaba6)
on build01 d0f6f51a
Using Docker executor with image docker:stable ...