Drillster / drone-volume-cache

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

mount directory does not exist, removing from cached folder... #27

Open mcnesium opened 4 years ago

mcnesium commented 4 years ago

I am trying to run it with this .drone.yml:

pipeline:

  restore-cache:
    image: drillster/drone-volume-cache
    restore: true
    mount:
      - /drone/.bundle
    volumes:
      - /var/cache/drone/test:/cache

  build:
    image: ruby
    environment:
      - BUNDLE_PATH=/drone/.bundle
    commands:
      - bundle install
      - bundle exec jekyll build

  rebuild-cache:
    image: drillster/drone-volume-cache
    rebuild: true
    mount:
      - /drone/.bundle
    volumes:
      - /var/cache/drone/test:/cache

but after the successful build the only output of rebuild-cache in drone says

/drone/.bundle does not exist, removing from cached folder...

and on the host system the directory /var/cache/drone/test remains empty. what is wrong with this pipeline?

dromer commented 3 years ago

I think the plugin can only access local folders (from the working directory). So it will copy those folders back and forth between your volume mount. (i'm having the same issue atm)

So you can only use a local path to a local folder, not a system-path like your /drone/.bundle

Use ./.bundle on the mount and your ruby environment and it will probably work.