Drone plugin to synchronize a directory with an S3 bucket
Go to file
2019-02-25 22:21:07 +01:00
.github Add some basic issue template content 2019-01-21 21:02:05 +01:00
docker Fix manifest template helper 2019-02-25 22:21:07 +01:00
.dockerignore Restructuring of build process 2017-08-28 23:31:49 +02:00
.drone.jsonnet Add a reliable version and integrate libsonnet definition 2019-02-15 10:29:44 +01:00
.drone.windows.jsonnet Add a reliable version and integrate libsonnet definition 2019-02-15 10:29:44 +01:00
.drone.windows.yml Add a reliable version and integrate libsonnet definition 2019-02-15 10:29:44 +01:00
.drone.yml Add a reliable version and integrate libsonnet definition 2019-02-15 10:29:44 +01:00
.gitignore Updated to current build process (#39) 2018-04-25 09:10:51 +08:00
aws.go Merge branch 'master' into master 2019-02-11 09:29:55 +01:00
go.mod Update golang.org/x/net commit hash to ed066c8 2019-01-23 10:07:59 +00:00
go.sum Update golang.org/x/net commit hash to ed066c8 2019-01-23 10:07:59 +00:00
LICENSE initial commit 2015-10-16 13:09:45 -07:00
main.go Drop import of unused fmt package 2019-02-18 23:47:42 +01:00
pipeline.libsonnet Add a reliable version and integrate libsonnet definition 2019-02-15 10:29:44 +01:00
plugin.go Merge branch 'master' into master 2019-02-11 09:29:55 +01:00
README.md Unified documentation and readme 2019-02-15 11:58:30 +01:00
types.go Restructuring of build process 2017-08-28 23:31:49 +02:00

drone-s3-sync

Build Status Gitter chat Join the discussion at https://discourse.drone.io Drone questions at https://stackoverflow.com Go Doc Go Report

Drone plugin to synchronize a directory with an Amazon S3 Bucket. For the usage information and a listing of the available options please take a look at the docs.

Build

Build the binary with the following command:

export GOOS=linux
export GOARCH=amd64
export CGO_ENABLED=0
export GO111MODULE=on

go build -v -a -tags netgo -o release/linux/amd64/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 docker/Dockerfile.linux.amd64 --tag plugins/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) \
  plugins/s3-sync