Created
May 29, 2017 10:02
-
-
Save gillesdemey/4db2b04d5ab89e038c71b4bbb79e9f5f to your computer and use it in GitHub Desktop.
Authenticate with gloud and kubectl in Drone
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
pipeline: | |
... | |
deploy: | |
image: google/cloud-sdk | |
commands: | |
- printenv KUBE_SERVICE_ACCOUNT > credentials.json | |
- gcloud auth activate-service-account --key-file=credentials.json | |
- "gcloud container clusters get-credentials $CLUSTER_NAME \ | |
--zone $PROJECT_ZONE \ | |
--project $PROJECT_NAME" | |
- kubectl set image deployment <deployment> <container>=<image> --record | |
when: | |
status: success |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
https://github.com/tonglil/auth-gcloud
https://github.com/tonglil/auth-gke/