I get an error running the caching example from the docs.
Gitlab version is 11.0.3, Docker Executor version 11.0.0.
/etc/gitlab-runner/config.toml:
concurrent = 1
check_interval = 0
[[runners]]
name = "rnd001"
url = "http://..."
token = "..."
executor = "docker"
[runners.docker]
tls_verify = false
image = "alpine:latest"
privileged = false
disable_cache = false
volumes = ["/cache"]
shm_size = 0
[runners.cache]
gitlab-ci.yml:
stages:
- build
- test
job A:
stage: build
script:
- mkdir tmp/
- echo "build" > tmp/hello.txt
cache:
key: build-cache
paths:
- tmp/
job B:
stage: test
script:
- cat tmp/hello.txt
cache:
key: build-cache
Log JobA
Running with gitlab-runner 11.0.0 (5396d320)
on rnd001 79ae4976
Using Docker executor with image alpine:latest ...
Pulling docker image alpine:latest ...
Using docker image sha256:11cd0b38bc3ceb958ffb2f9bd70be3fb317ce7d255c8a4c3f4af30e298aa1aab for alpine:latest ...
Running on runner-79ae4976-project-2-concurrent-0 via rnd001...
Fetching changes...
Removing test/
HEAD is now at ca45780 Fix
From http://172.22.31.249/rd/webhmi
ca45780..165d9c2 feature/ci -> origin/feature/ci
Checking out 165d9c27 as feature/ci...
Skipping Git submodules setup
Checking cache for build-cache-1...
Successfully extracted cache
$ mkdir tmp/
$ echo "build" > tmp/hello.txt
Creating cache build-cache-1...
tmp/: found 2 matching files
Created cache
Job succeeded
Log JobB
Running with gitlab-runner 11.0.0 (5396d320)
on rnd001 79ae4976
Using Docker executor with image alpine:latest ...
Pulling docker image alpine:latest ...
Using docker image sha256:11cd0b38bc3ceb958ffb2f9bd70be3fb317ce7d255c8a4c3f4af30e298aa1aab for alpine:latest ...
Running on runner-79ae4976-project-2-concurrent-0 via rnd001...
Fetching changes...
HEAD is now at 165d9c2 Fix
Checking out 165d9c27 as feature/ci...
Skipping Git submodules setup
$ cat tmp/hello.txt
cat: can't open 'tmp/hello.txt': No such file or directory
ERROR: Job failed: exit code 1
I am probably missing something obvious here. Thanks in advance for the advice.