Skip to content

Instantly share code, notes, and snippets.

@manualwise
Forked from zachflower/kubernetes-deploy.sh
Created October 13, 2016 18:03
Show Gist options
  • Save manualwise/b11c4422ec6bc560d94e7ec99eef5070 to your computer and use it in GitHub Desktop.
Save manualwise/b11c4422ec6bc560d94e7ec99eef5070 to your computer and use it in GitHub Desktop.
Codeship Kubernetes Deploy
#!/bin/bash
set -e
# authenticate to google cloud
codeship_google authenticate
# set compute zone
gcloud config set compute/zone us-central1-a
# set kubernetes cluster
gcloud container clusters get-credentials cluster-name
# update kubernetes Deployment
GOOGLE_APPLICATION_CREDENTIALS=/keyconfig.json kubectl set image deployment/deployment-name app=gcr.io/project-name/app-name:$CI_TIMESTAMP
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment