drone-plugins / drone-s3-cache

Caches build artifacts to S3 compatible storage backends
http://plugins.drone.io/drone-plugins/drone-s3-cache
Apache License 2.0
29 stars 30 forks source link

linked docs for configuration are incorrect #67

Closed sneak closed 3 years ago

sneak commented 3 years ago

http://plugins.drone.io/drone-plugins/drone-s3-cache/ says:

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

I tried:

pipeline:
  restore:
    image: plugins/s3-cache
    settings:
      debug: true
      pull: true
      endpoint: https://redacted
      access_key:
        from_secret: minio_access_key
      secret_key:
        from_secret: minio_secret_key
      restore: true

I got:

time="2020-10-13T00:12:20Z" level=info msg="mode specified using boolean config" flush=false rebuild=false restore=false
time="2020-10-13T00:12:20Z" level=error msg="validation failed: no mode specified"
sneak commented 3 years ago

Even with:

pipeline:
  restore:
    image: plugins/s3-cache
    settings:
      mode: restore
      endpoint: https://redacted
      access_key:
        from_secret: minio_access_key
      secret_key:
        from_secret: minio_secret_key

I still get:

time="2020-10-13T00:24:05Z" level=info msg="mode specified using boolean config" flush=false rebuild=false restore=false
time="2020-10-13T00:24:05Z" level=error msg="validation failed: no mode specified"
sneak commented 3 years ago

Nevermind, it needed to be steps: instead of pipeline:. Confusing.

tboerger commented 3 years ago

pipeline had been used before Drone 1.0.0, since 1.0.0 you got to use steps and the array syntax.