Drone plugin for publishing files to Backblaze B2
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
renovate[bot] 2a1fa52d8e chore(deps): update golang.org/x/sync commit hash to 56d3577 (#59) 1 month ago
docker Create Dockerfile.linux.arm64 2 months ago
.drone.yml Create .drone.yml 2 months ago
.gitignore upgrade to 0.5 3 years ago
LICENSE Initial commit 4 years ago
README.md Switch to use B2 1 year ago
go.mod chore(deps): update golang.org/x/sync commit hash to 56d3577 (#59) 1 month ago
main.go chore(dep): switch to go mod (#5) 2 months ago
plugin.go chore(dep): switch to go mod (#5) 2 months ago
renovate.json Add renovate.json (#2) 2 months ago

README.md

drone-b2

Drone plugin to publish files and artifacts to Backblaze B2. 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 commands:

go build
go test

Docker

Build the Docker image with the following commands:

CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -a -tags netgo
docker build --rm=true -t techknowlogick/drone-b2 .

Please note incorrectly building the image for the correct x64 linux and with CGO disabled will result in an error when running the Docker image:

docker: Error response from daemon: Container command
'/bin/drone-b2' not found or does not exist..

Usage

Execute from the working directory:

docker run --rm \
  -e PLUGIN_SOURCE=<source> \
  -e PLUGIN_TARGET=<target> \
  -e PLUGIN_BUCKET=<bucket> \
  -e B2_ACCOUNT_ID=<token> \
  -e B2_APPLICATION_KEY=<secret> \
  -v $(pwd):$(pwd) \
  -w $(pwd) \
  techknowlogick/drone-b2 --dry-run

Thanks

This plugin is forked form drone-s3 and changed to use Backblaze B2