Last active
April 28, 2021 04:54
-
-
Save felds/51c08463c7ae7084f343bd8933983f60 to your computer and use it in GitHub Desktop.
Cloud Build to GCE sample
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# IMPORTANT: | |
# Dont forget to to replace the INSTANCE_NAME for the name | |
# of the instance we created on step 2 | |
steps: | |
- name: gcr.io/cloud-builders/docker | |
args: | |
- build | |
- '-t' | |
- 'gcr.io/$PROJECT_ID/docker-node-hello-world:$COMMIT_SHA' | |
- . | |
- name: gcr.io/cloud-builders/gcloud | |
args: | |
- compute | |
- instances | |
- update-container | |
- INSTANCE_NAME | |
- '--zone=us-central1-a' | |
- '--container-image=gcr.io/$PROJECT_ID/docker-node-hello-world:$COMMIT_SHA' | |
images: | |
- 'gcr.io/$PROJECT_ID/docker-node-hello-world:$COMMIT_SHA' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment