Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support compression / gzip #21

Closed
jpillora opened this issue Jun 24, 2016 · 3 comments
Closed

Support compression / gzip #21

jpillora opened this issue Jun 24, 2016 · 3 comments

Comments

@jpillora
Copy link

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?

@jpillora
Copy link
Author

I've forked and implemented it here 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:

@jpillora
Copy link
Author

[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

@jpillora
Copy link
Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant