-
-
Save hungbang/981be502ae9f3f1720f40d4c1b39e5ec to your computer and use it in GitHub Desktop.
Deploy a new image from Google Cloud Container Builder to Kubernetes, by storing GKE credentials in GCS.
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
| steps: | |
| - name: 'gcr.io/cloud-builders/npm' | |
| args: ['install'] | |
| - name: 'gcr.io/cloud-builders/npm' | |
| args: ['test'] | |
| - name: 'gcr.io/cloud-builders/docker' | |
| args: ["build", "-t", "gcr.io/$PROJECT_ID/frontend:$REVISION_ID", "."] | |
| - name: 'gcr.io/cloud-builders/docker' | |
| args: ["push", "gcr.io/$PROJECT_ID/frontend:$REVISION_ID"] | |
| - name: 'gcr.io/cloud-builders/gcloud' | |
| entrypoint: 'bash' | |
| args: | |
| - '-c' | |
| - | | |
| gcloud components install kubectl | |
| gsutil cp gs://container-kubernetes-key/kubeconfig . | |
| export KUBECONFIG=kubeconfig | |
| kubectl set image deployment/frontend frontend=gcr.io/$PROJECT_ID/frontend:$REVISION_ID |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment