Drillster / drone-volume-cache

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

Drone Syntax Not working for new versions #25

Closed ficofer closed 4 years ago

ficofer commented 5 years ago

Team,

I am trying to use the plugin with Drone 1.21

Following the docs ins http://plugins.drone.io/drillster/drone-volume-cache/

But Its does not seems to work with this:

- name: restore-cache
  image: drillster/drone-volume-cache
  volumes:
  - name: cache
    path: /tmp
  settings:
    restore: true
    mount:
      - ./build-cache

...

- name: rebuild-cache
  image: drillster/drone-volume-cache
  volumes:
  - name: cache
    path: /tmp
  settings:
    rebuild: true
    mount:
      - ./build-cache
  when:
    status: [ success, failure ]

My original idea was to use a pvc (I have mounted) in the dind container for this, it will be instead of /tmp should show /build-persists

But it does not seems to work either way.

The created container shows something like:

            {
                "Type": "volume",
                "Name": "4470fba1165c1d99af4aa751b1ae2fd4646df8229cbb7c8cca115af2fdefb32e",
                "Source": "/var/lib/docker/volumes/4470fba1165c1d99af4aa751b1ae2fd4646df8229cbb7c8cca115af2fdefb32e/_data",
                "Destination": "/cache",
                "Driver": "local",
                "Mode": "",
                "RW": true,
                "Propagation": ""
            }

Any hint in how to debug it?

Zikoel commented 4 years ago

Same problem here with drone version 1.6.2. All go fine but the cache is not used.