Skip to content

Instantly share code, notes, and snippets.

@Philmod
Last active October 10, 2017 21:10
Show Gist options
  • Save Philmod/f3f2a14953e2e26ebce3b1cada559799 to your computer and use it in GitHub Desktop.
Save Philmod/f3f2a14953e2e26ebce3b1cada559799 to your computer and use it in GitHub Desktop.
Parallel push to the 3 GCR registries
steps:
- name: 'gcr.io/cloud-builders/docker'
args:
- 'build'
- '-t'
- 'us.gcr.io/$PROJECT_ID/test'
- '-t'
- 'asia.gcr.io/$PROJECT_ID/test'
- '-t'
- 'eu.gcr.io/$PROJECT_ID/test'
- '.'
id: 'build'
- name: 'gcr.io/cloud-builders/docker'
args: ['push', 'us.gcr.io/$PROJECT_ID/test']
waitFor: ['build']
- name: 'gcr.io/cloud-builders/docker'
args: ['push', 'asia.gcr.io/$PROJECT_ID/test']
waitFor: ['build']
- name: 'gcr.io/cloud-builders/docker'
args: ['push', 'eu.gcr.io/$PROJECT_ID/test']
waitFor: ['build']
# Specify images to tie the build to these images.
images:
- 'us.gcr.io/$PROJECT_ID/test'
- 'asia.gcr.io/$PROJECT_ID/test'
- 'eu.gcr.io/$PROJECT_ID/test'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment