Google Cloud Storage

by wyattjoh

The example Yaml configurations in this file are using the legacy 0.8 syntax. If you are using Drone 1.0 or Drone Cloud please ensure you use the appropriate 1.0 syntax. Learn more here.

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

pipeline:
  gcs:
    image: wyattjoh/drone-gcs
    acl: public
    bucket: "my-bucket-name"
    source: public/**/*
    strip_prefix: public/
    target: /target/location

Enable compression:

pipeline:
  gcs:
    image: wyattjoh/drone-gcs
    acl: public
    bucket: "my-bucket-name"
    source: public/**/*
    strip_prefix: public/
+   compress: true
    target: /target/location

Exclude files from upload:

pipeline:
  gcs:
    image: wyattjoh/drone-gcs
    acl: public
    bucket: "my-bucket-name"
    source: public/**/*
    strip_prefix: public/
    target: /target/location
+   exclude:
+     - **/*.xml

Secret Reference

GOOGLE_APPLICATION_CREDENTIALS_CONTENTS
json contents of the google application credentials (see https://developers.google.com/identity/protocols/application-default-credentials)

Parameter Reference

bucket
bucket name
acl
access to files that are uploaded (private, public)
source
source location of the files, using a glob matching pattern
target
target location of files in the bucket
strip_prefix
strip the prefix from source path
exclude
glob exclusion patterns
compress
gzip files before they are uploaded and add a Content-Encoding: gzip

¿Hay algún error en esta página? Por favor, háganoslo saber o edite esta página.