Skip to content

Cache is not set or extracted after updating to 9.0

Hello,

after updating to 9.0 the cache is not set or extracted.

.gitlab-ci.yml:

stages:
  - Frontend
  - API
  - Deploy
before_script:
 - export REVISION=$(git describe --tags --abbrev=0)
cache:
 key: "$CI_PIPELINE_ID"
 paths: 
  - outputFrontend/
  - publish/
TestAndBuild-frontend:
 stage: Frontend
 image: node
 script:
   - cp -a ./src/dist/. ./outputFrontend
TestAndBuild-api:
 stage: API
 image: microsoft/dotnet:1.1.1-sdk
 script: 
   - cp -a ./outputFrontend ./src/wwwroot

Output stage Frontend:

$ ls -la
total 52
drwxrwxrwx 6 root root 4096 Mar 23 11:10 .
drwxrwxrwx 4 root root 4096 Mar 23 11:09 ..
drwxrwxrwx 5 root root 4096 Mar 23 11:09 .git
-rw-rw-rw- 1 root root 2518 Mar 23 11:09 .gitattributes
-rw-rw-rw- 1 root root 5626 Mar 23 11:09 .gitignore
-rw-rw-rw- 1 root root 1572 Mar 23 11:09 .gitlab-ci.yml
-rw-rw-rw- 1 root root 2397 Mar 23 11:09 README.md
-rw-rw-rw- 1 root root  113 Mar 23 11:09 dockerfile
drwxr-xr-x 3 root root 4096 Mar 23 11:10 outputFrontend
drwxrwxrwx 5 root root 4096 Mar 23 11:09 src
drwxrwxrwx 2 root root 4096 Mar 23 11:09 stylecop
Creating cache 2775...
Created cache

Output stage API:

Checking cache for 2775...
Successfully extracted cache
$ export REVISION=$(git describe --tags --abbrev=0)
$ ls -la
total 48
drwxrwxrwx 5 root root 4096 Mar 23 11:11 .
drwxrwxrwx 4 root root 4096 Mar 23 11:11 ..
drwxrwxrwx 5 root root 4096 Mar 23 11:11 .git
-rw-rw-rw- 1 root root 2518 Mar 23 11:11 .gitattributes
-rw-rw-rw- 1 root root 5626 Mar 23 11:11 .gitignore
-rw-rw-rw- 1 root root 1572 Mar 23 11:11 .gitlab-ci.yml
-rw-rw-rw- 1 root root 2397 Mar 23 11:11 README.md
-rw-rw-rw- 1 root root  113 Mar 23 11:11 dockerfile
drwxrwxrwx 5 root root 4096 Mar 23 11:11 src
drwxrwxrwx 2 root root 4096 Mar 23 11:11 stylecop

Unnecessary parts of the script have been removed. The script did work with 1.1.1

Thanks in advance!