Issues with different caching paths between different images

Im currently using this setup:

    working_directory: ~/build
        - image: circleci/node:9.11.2

      - checkout
      - save_cache:
          key: v1-repo-{{ .Branch }}-{{ .Revision }}
            - .

Then im restorin the repo time and time and it works for most jobs in the workflow. With this message

Found a cache from build 296 at v1-repo-dev-3da7c6d6593720cbd32c450c1b6dcebec3db119e
Size: 21 MB
Cached paths:
  * /home/circleci/build

But something strange happens when i suddenly enter google/cloud-sdk image.
It fails because it doesnt find the files in the root of my repo. With a different folder than cache.

ERROR: ( [/root/build/app-dev.yaml] does not exist.

Does circle ci use the whole cached paths for unarchiving, or what happens, why cant i find my app.yaml file? I had very similar problems when caching the nodemodules, but I solved that with a different approach which i cant use here.

Or is it something else going on?

I have some debug data:
Im running these commands:

echo "/home/circleci/build/"
ls /home/circleci/build/

client	node_modules  src
/home/circleci/build/	    contracts	      src
app-dev.yaml	 cicd_overview.png  test
app.yaml	 client		    nodemon.json      tools   package.json      yarn.lock

There we can see that everything is put in the full path that is cached. But it is not from where this new image is working

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.