Google Cloud Storage

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:

kind: pipeline
name: default

steps:
- name: upload  
  image: plugins/gcs
  settings:
    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:

kind: pipeline
name: default

steps:
- name: upload  
  image: plugins/gcs
  settings:
    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:
      from_secret: your-google-token

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