Google Cloud Storage

by drone-plugins

The GCS plugin can be used to publish files and artifacts to Google Cloud Storage. The following pipeline configuration uses the GCS plugin to upload files:

pipeline:
  gcs:
    image: plugins/gcs
    source: dist
    target: bucket/dir/
    ignore: bin/*
    acl: allUsers:READER,user@domain.com:OWNER
    gzip: js,css,html
    cache_control: public,max-age=3600
    metadata: {"x-goog-meta-foo":"bar"}
    token: your-google-token

Example configuration using secrets:

pipeline:
  gcs:
    image: plugins/gcs
    source: dist
    target: bucket/dir/
    ignore: bin/*
    acl: allUsers:READER,user@domain.com:OWNER
    gzip: js,css,html
    cache_control: public,max-age=3600
    metadata: {"x-goog-meta-foo":"bar"}
-   token: your-google-token
+   secrets: [google_credentials]

Secret Reference

google_credentials, token
credentials to access Google Cloud Storage

Parameter Reference

token
credentials to access Google Cloud Storage
acl
a list of access rules applied to the uploaded files, in a form of entity:role
source
location of files to upload
ignore
skip files matching this pattern, relative to source
target
destination to copy files to, including bucket name
gzip
files with the specified extensions will be gzipped and uploaded with “gzip” Content-Encoding header
cache_control
Cache-Control header
metadata
an arbitrary dictionary with custom metadata applied to all objects

Is there a mistake on this page? Please let us know or edit this page.