google-nomulus/release/cloudbuild-sync.yaml
Lai Jiang 9cd7c9402f
Always clone the internal repo to nomulus-internal
Also updated .gcloudignore to not pull in unnecessary files when running
`gcloud builds submit`.
2019-06-20 14:26:36 -04:00

24 lines
881 B
YAML

# To run the build locally, install cloud-build-local first.
# Then run:
# cloud-build-local --config=cloudbuild-sync.yaml --dryrun=false --substitutions TAG_NAME=[TAG] ..
# This will sync the folder gs://[PROJECT_ID]-deploy/[TAG] to gs://[PROJECT_ID]-deploy/live.
# The PROJECT_ID is the current project name that gcloud uses.
#
# To manually trigger a build on GCB, run:
# gcloud builds submit --config cloudbuild-sync.yaml --substitutions TAG_NAME=[TAG] ..
#
# To trigger a build automatically, follow the instructions below and add a trigger:
# https://cloud.google.com/cloud-build/docs/running-builds/automate-builds
steps:
# Rsync the folder.
- name: 'gcr.io/${PROJECT_ID}/builder:latest'
args:
- 'gsutil'
- '-m'
- 'rsync'
- '-d'
- 'gs://${PROJECT_ID}-deploy/${TAG_NAME}'
- 'gs://${PROJECT_ID}-deploy/live'
timeout: 3600s
options:
machineType: 'N1_HIGHCPU_8'