Drone plugins > AWS S3 Cache
amazon_s3.svg

AWS S3 Cache

by drone-plugins


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

Example

kind: pipeline
name: default

steps:
- name: restore
  image: plugins/s3-cache
  settings:
    pull: true
    endpoint: http://minio.company.com
    access_key: myaccesskey
    secret_key: supersecretKey
    restore: true

Properties

  • endpoint

    stringoptional

    custom endpoint URL (optional, to use a S3 compatible non-Amazon service)

    Default: none

  • access_key

    stringoptional

    amazon access key

    Default: none

  • secret_key

    stringoptional

    amazon secret key

    Secret recommended

    Default: none

  • restore

    booleanoptional

    mode to restore the build environment from cache

    Default: false

  • rebuild

    booleanoptional

    mode to rebuild the cache from the build environment and specified mounts

    Default: false

  • flush

    booleanoptional

    mode to flush the cache of old cache items (please be sure to set this so we don't waste storage)

    Default: false

  • flush_age

    numberoptional

    flush cache files older then x days

    Default: 30

  • mount

    arrayoptional

    list of files/directories to cache

    Default: none

  • debug

    booleanoptional

    enable debug logging

    Default: false

  • filename

    stringoptional

    filename for the cache

    Default: none

  • root

    stringoptional

    root path prefix for all cache default paths (path, fallback_path, and flush_path).

    Default: /

  • path

    stringoptional

    path to store the cache file

    Default: [root]/<owner>/<repo>/<branch>/

  • fallback_path

    stringoptional

    fallback path for the cache file

    Default: [root]/<owner>/<repo>/<branch>/

  • flush_path

    stringoptional

    path to search for flushable cache files.

    Default: [root]/<owner>/<repo>/

  • workdir

    stringoptional

    path where to restore the cache files to.

    Default: none