mirror of
https://github.com/thegeeklab/wp-s3-action.git
synced 2024-11-12 17:30:39 +00:00
2.2 KiB
2.2 KiB
title |
---|
drone-s3-sync |
Drone plugin to synchronize a directory with an S3 bucket.
{{< toc >}}
Usage
kind: pipeline
name: default
steps:
- name: sync
image: thegeeklab/drone-s3-sync
settings:
access_key: a50d28f4dd477bc184fbd10b376de753
secret_key: bc5785d3ece6a9cdefa42eb99b58986f9095ff1c
region: us-east-1
bucket: my-bucket.s3-website-us-east-1.amazonaws.com
source: folder/to/archive
target: /target/location
Parameters
{{< propertylist name=drone-s3-sync >}}
Build
Build the binary with the following command:
export GOOS=linux
export GOARCH=amd64
export CGO_ENABLED=0
export GO111MODULE=on
make build
Build the Docker image with the following command:
docker build --file docker/Dockerfile.amd64 --tag thegeeklab/drone-s3-sync .
Test
docker run --rm \
-e PLUGIN_BUCKET=my_bucket \
-e AWS_ACCESS_KEY_ID=abc123 \
-e AWS_SECRET_ACCESS_KEY=xyc789 \
-v $(pwd):$(pwd) \
-w $(pwd) \
thegeeklab/drone-s3-sync