Skip to content

Instantly share code, notes, and snippets.

@Philmod
Created October 19, 2017 16:18
Show Gist options
  • Save Philmod/ba3c37ed46da9ab6246c3e9ff1063d40 to your computer and use it in GitHub Desktop.
Save Philmod/ba3c37ed46da9ab6246c3e9ff1063d40 to your computer and use it in GitHub Desktop.
GCB with deploy to GKE
steps:
- name: 'gcr.io/cloud-builders/docker'
args: ["build", "-t", "gcr.io/$PROJECT_ID/birthday:$REVISION_ID", "."]
- name: 'gcr.io/cloud-builders/docker'
args: ["push", "gcr.io/$PROJECT_ID/birthday:$REVISION_ID"]
- name: 'gcr.io/cloud-builders/kubectl'
args: ['set', 'image', 'deployment/birthday', 'birthday=gcr.io/$PROJECT_ID/birthday:$REVISION_ID']
env:
- 'CLOUDSDK_COMPUTE_ZONE=us-east1-b'
- 'CLOUDSDK_CONTAINER_CLUSTER=node-example-cluster'
- name: 'gcr.io/cloud-builders/kubectl'
args: ['rollout', 'status', 'deployment/birthday']
env:
- 'CLOUDSDK_COMPUTE_ZONE=us-east1-b'
- 'CLOUDSDK_CONTAINER_CLUSTER=node-example-cluster'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment