drone-s3-sync

command module
v0.0.0-...-d4453cb Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 12, 2024 License: Apache-2.0 Imports: 20 Imported by: 0

README

Docker Pulls Quay.io Enabled build

drone-s3-sync

Drone plugin to synchronize a directory with an Amazon S3 Bucket.

This is a fork of the official plugin

Build

Build the binary with the following command:

export CGO_ENABLED=0
export GO111MODULE=on

go build -v -a -tags netgo -o release/drone-s3-sync
Docker

Build the Docker image with the following command:

docker build \
  --label org.label-schema.build-date=$(date -u +"%Y-%m-%dT%H:%M:%SZ") \
  --label org.label-schema.vcs-ref=$(git rev-parse --short HEAD) \
  --file Dockerfile --tag noenv/s3-sync .
Usage
docker run --rm \
  -e PLUGIN_SOURCE=<source> \
  -e PLUGIN_TARGET=<target> \
  -e PLUGIN_BUCKET=<bucket> \
  -e AWS_ACCESS_KEY_ID=<access_key> \
  -e AWS_SECRET_ACCESS_KEY=<secret_key> \
  -v $(pwd):$(pwd) \
  -w $(pwd) \
  noenv/s3-sync
Debug
DEBUG=1 ./release/linux/amd64/drone-s3-sync \
  --access-key <access_key> \
  --secret-key <secret_key> \
  --bucket <bucket> \
  --region <region> \
  --source . \
  --target / \
  --access public-read \
  --content-type '{".txt":"text/plain"}' \
  --cache-control '{"*.txt":"max-age=3600"}' \
  --delete \
  --dry-run
Source

https://github.com/noenv/drone-s3-sync

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL