Permalink
Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
101 lines (79 sloc) 2.01 KB
date title author tags logo repo image
2017-12-04 00:00:00 +0000
Backblaze B2
techknowlogick
publish
backblaze
b2
storage
backblaze-b2-logo.svg
techknowlogick/drone-b2
techknowlogick/drone-b2

The B2 plugin uploads files and build artifacts to your B2 bucket. The below pipeline configuration demonstrates simple usage:

pipeline:
  b2:
    image: techknowlogick/drone-b2
    bucket: my-bucket-name
    account: a50d28f4dd477bc184fbd10b376de753
    key: bc5785d3ece6a9cdefa42eb99b58986f9095ff1c
    source: public/**/*
    target: /target/location

Use secrets instead of hardcoding credentials:

pipeline:
  s3:
    image: techknowlogick/drone-b2
    bucket: my-bucket-name
-   account: a50d28f4dd477bc184fbd10b376de753
-   key: bc5785d3ece6a9cdefa42eb99b58986f9095ff1c
+    secrets: [ b2_account_id, b2_application_key ]
    source: public/**/*
    target: /target/location

Configure the plugin to strip path prefixes when uploading:

pipeline:
  s3:
    image: techknowlogick/drone-b2
    bucket: my-bucket-name
    secrets: [ b2_account_id, b2_application_key ]
    source: public/**/*
    target: /target/location
+   strip_prefix: public/

Configure the plugin to exclude files from upload:

pipeline:
  s3:
    image: techknowlogick/drone-b2
    bucket: my-bucket-name
    secrets: [ b2_account_id, b2_application_key ]
    source: public/**/*
    target: /target/location
+   exclude:
+     - **/*.xml

Secret Reference

b2_account_id (optional) : backblaze account ID

b2_application_key (optional) : backblaze secret key

Parameter Reference

account (optional) : backblaze account ID

key (optional) : backblaze secret key

bucket : bucket name

source : source location of the files, using a glob matching pattern

target : target location of files in the bucket

encryption : if provided, use server-side encryption

strip_prefix : strip the prefix from source path

exclude : glob exclusion patterns

path_style : whether path style URLs should be used (true for minio)