Drone plugins > Volume Cache
volume_cache.svg

Volume Cache

by drillster


The volume cache plugin can be used to preserve files and directories between builds.

Example

kind: pipeline
name: default

steps:
- name: restore-cache
  image: drillster/drone-volume-cache
  volumes:
    - name: cache
      path: /cache
  settings:
    restore: true
    mount:
      - ./node_modules
- name: rebuild-cache
  image: drillster/drone-volume-cache
  volumes:
    - name: cache
      path: /cache
  settings:
    rebuild: true
    mount:
      - ./node_modules

volumes:
  - name: cache
    host:
      path: /tmp/cache

Properties

  • restore

    booleanoptional

    Restore cache from previous build.

    Default: false

  • rebuild

    booleanoptional

    Rebuild cache.

    Default: false

  • mount

    arrayoptional

    list of folders or files to cache

    Default: none