Skip to content

Instantly share code, notes, and snippets.

@zachflower
Created October 6, 2016 20:06
Show Gist options
  • Save zachflower/9ea5f65e6a70bd2afe3d3880576f5bdf to your computer and use it in GitHub Desktop.
Save zachflower/9ea5f65e6a70bd2afe3d3880576f5bdf 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