Created
June 16, 2019 08:51
-
-
Save mlabouardy/56bbd8aa43411219171e6ecf5883054c to your computer and use it in GitHub Desktop.
Continuous deployment with Google Cloud Build on GCP
This file contains 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
- id: 'configure kubectl' | |
name: 'gcr.io/cloud-builders/gcloud' | |
env: | |
- 'CLOUDSDK_COMPUTE_ZONE=${_CLOUDSDK_COMPUTE_ZONE}' | |
- 'CLOUDSDK_CONTAINER_CLUSTER=${_CLOUDSDK_CONTAINER_CLUSTER}' | |
- 'KUBECONFIG=/kube/config' | |
entrypoint: 'sh' | |
args: | |
- '-c' | |
- | | |
gcloud container clusters get-credentials "$${CLOUDSDK_CONTAINER_CLUSTER}" --zone "$${CLOUDSDK_COMPUTE_ZONE}" | |
volumes: | |
- name: 'kube' | |
path: /kube | |
- id: 'deploy to k8s' | |
name: 'gcr.io/cloud-builders/gcloud' | |
env: | |
- 'KUBECONFIG=/kube/config' | |
entrypoint: 'sh' | |
args: | |
- '-c' | |
- | | |
kubectl set image deployment/app app=registry.serverlessmovies.com/mlabouardy/app:$SHORT_SHA | |
volumes: | |
- name: 'kube' | |
path: /kube |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment