Closed jpillora closed 8 years ago
I've forked and implemented it here https://github.com/drone-plugins/drone-s3/compare/master...jpillora:master
I modified the dockerfile to get it to also build the binary, though when testing it on my drone server, it seems as if it's not picking up any of the options:
[info] Pulling image jpillora/drone-s3:latest
time="2016-06-24T04:11:31Z" level=info msg="Attempting to upload" bucket=us-east-1 endpoint= region=us-east-1
time="2016-06-24T04:11:31Z" level=error msg="Could not match files" error="file does not exist"
2016/06/24 04:11:31 file does not exist
Just tried reverting the Dockerfile and building outside of Docker and its still not picking up the s3
config. My drone.yaml is the same except that I've added image: jpillora/drone-s3
. I've also updated the server's whitelist.
You can upload S3 objects with
Content-Encoding: gzip
and the majority HTTP clients will automatically decompress during the GET.As an API, I'm thinking a simple
compress: true
/gzip: true
yaml setting will suffice.If we wanted to take it further, there could be a list of files to gzip, or a list of included file types, or maybe the smartest thing to do is a excluded file types (with defaults: mp3, jpg, gz, zip) - basically so we don't compress files which are already compressed.
I'm just looking into creating custom Drone plugins now so I can send a PR. Does this addition sound okay?