Skip to content
This repository has been archived by the owner on Apr 24, 2018. It is now read-only.

Commit

Permalink
update travis
Browse files Browse the repository at this point in the history
  • Loading branch information
jwaldrip committed Mar 21, 2017
1 parent 111fd3f commit 91778e9
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,24 +7,19 @@ env:
- CLOUDSDK_CONTAINER_USE_CLIENT_CERTIFICATE=True
before_deploy:
# Authorize with gcloud
- echo $GCLOUD_ENCODED_CREDS | base64 -d > /tmp/gcloud.json
- gcloud auth activate-service-account $(jq -r ".client_email" /tmp/gcloud.json) --key-file=/tmp/gcloud.json
- >
if [[ -n "$TRAVIS_TAG" ]] ; then
echo $GCLOUD_ENCODED_CREDS | base64 -d > /tmp/gcloud.json &&
gcloud auth activate-service-account $(jq -r ".client_email" /tmp/gcloud.json) --key-file=/tmp/gcloud.json &&
gcloud container clusters get-credentials production --project=commercial-tribe --zone=us-east1-c;
else
echo $GCLOUD_ENCODED_STAGING_CREDS | base64 -d > /tmp/gcloud.json &&
gcloud auth activate-service-account $(jq -r ".client_email" /tmp/gcloud.json) --key-file=/tmp/gcloud.json &&
gcloud container clusters get-credentials staging --project=commercial-tribe-staging --zone=us-central1-a;
fi
# Install and configure kubectl
- CLOUDSDK_CORE_DISABLE_PROMPTS=true sudo gcloud components update kubectl --version 142.0.0
- export PATH=/usr/lib/google-cloud-sdk/bin:$PATH
- sudo chown -R $USER /home/travis/.config/gcloud

# Authorize docker for access to gcloud
- gcloud docker --authorize-only
deploy:
- provider: script
script: ./build-and-push.sh
Expand Down

0 comments on commit 91778e9

Please sign in to comment.