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

Add option to ignore/swallow errors #50

Closed dan-kirberger closed 5 years ago

dan-kirberger commented 5 years ago

It would be handy to mark this task to indicate we dont want s3 failures to tank our build:

  restore_from_cache:
    image: docker.target.com/drone/drone-s3-cache
    pull: true
    restore: true
    required: false // look at me!

note the required: false

For many, this plugin might be used as a convenience to improve build performance. Momentary hiccups in s3 connectivity should not break the build, but simply slow it down.

tboerger commented 5 years ago

So there are different opinions... Imho it's totally valid to fail the build if an error happens.

donny-dont commented 5 years ago

Drone has an option for that https://github.com/drone/drone-yaml/blob/master/yaml/testdata/pipeline.yml#L61

Add failure: ignore.

bradrydzewski commented 5 years ago

yes, adding failure: ignore to the step should handle this use case assuming you are using Drone 1.0. @dan-kirberger I think we have this use case covered at the yaml-level so I am going to close this. If there are other use cases we have not considered let me know and we can re-open.

dan-kirberger commented 5 years ago

We're not on 1.0 yet but that's the perfect solution. Happy to wait for that. Thanks!