Files put in /cache are not persisted accross builds (hosted CI, shared runners)
I'm trying to cache a bunch of libs accross build jobs. In my build scripts I do this :
image: bluedme/dex-docker-ci:latest
...
server:
stage: test
script:
...
- cp -a /cache/.ivy2 /root/.ivy2 || true
- sbt -mem 2048 clean test
- cp -a /root/.ivy2 /cache/.ivy2
From what I understood of the doc, the content of /cache should be kept, and from what I see in logs, that's not the case :
cp: cannot stat ‘/cache/.ivy2’: No such file or directory
Am I missing something ? Any help will be apreciated.