Drillster / drone-volume-cache

Drone plugin for caching to a locally mounted volume
MIT License
109 stars 42 forks source link

No cache for ./node_modules #29

Open imteekay opened 2 years ago

imteekay commented 2 years ago

I'm running this plugin in our CI (drone v0.8) but it seems that it doesn't cache the node modules folder.

My pipeline looks like this:

restore-cache:
  image: drillster/drone-volume-cache
  restore: true
  cache_key: [DRONE_REPO_OWNER, DRONE_REPO_NAME, DRONE_BRANCH]
  mount:
    - ./node_modules
  volumes:
    - /tmp/cache

install:
  image: node:14.15.4
  commands:
    - npm install

rebuild-cache:
  image: drillster/drone-volume-cache
  rebuild: true
  cache_key: [DRONE_REPO_OWNER, DRONE_REPO_NAME, DRONE_BRANCH]
  mount:
    - ./node_modules
  volumes:
    - /tmp/cache

In the first commit, I get this from the rebuild-cache step

Rebuilding cache for folder ./node_modules...

In the second commit, I get a No cache for ./node_modules.

Am I missing anything here in these steps?

mjwwit commented 2 years ago

It looks like it should work. Did you check the contents of the cache folder (/tmp/cache)?