Permalink
Browse files

Fix gcloud install and deploy script (#1060)

* Update client_secret

* Download gcloud sdk

gcloud compoenents install kubeclt was erroring with
ERROR: (gcloud.components.install) You cannot perform this action because this Cloud SDK installation is managed by an external package manager.
Please consider using a separate installation of the Cloud SDK created through the default mechanism described at: https://cloud.google.com/sdk/

Migrate to apt-get based install to be compatible with Ubuntu docker image.

* Source

* Remove gratuitous quotes and &&

* Decrypt without touching disk

* Use a service-key, not a oauth client secret
  • Loading branch information...
gdbelvin committed Oct 9, 2018
1 parent fb5cf0e commit a2c69e0757ffe8ef515f1e1f41efab63cd22c58b
Showing with 19 additions and 12 deletions.
  1. +19 −12 .travis.yml
  2. BIN client_secrets.json.enc
  3. BIN travis_secrets.tar.gz.enc
View
@@ -1,12 +1,12 @@
language: go
go:
- "1.x"
- 1.x
dist: trusty
services:
- docker-ce
cache:
directories:
- $HOME/google-cloud-sdk/
- "$HOME/gcloud/"
env:
global:
- DOCKER_COMPOSE_VERSION="1.13.0"
@@ -18,9 +18,23 @@ addons:
packages:
- python3-pip
before_install:
- if [ ! -d $HOME/gcloud/google-cloud-sdk ]; then
mkdir -p $HOME/gcloud
wget https://dl.google.com/dl/cloudsdk/release/google-cloud-sdk.tar.gz --directory-prefix=$HOME/gcloud
cd $HOME/gcloud
tar xzf google-cloud-sdk.tar.gz
./google-cloud-sdk/install.sh -q
cd $TRAVIS_BUILD_DIR;
fi
- source "$HOME/gcloud/google-cloud-sdk/path.bash.inc"
- gcloud -q components update
- gcloud -q version
install:
- gcloud -q components install kubectl
- go get -u github.com/alecthomas/gometalinter
- gometalinter --install
- gometalinter --install
- go get -t ./...
script:
@@ -36,15 +50,8 @@ before_deploy:
- pip3 install --user docker-compose
- docker --version
- docker-compose --version
- if [ ! -d "$HOME/google-cloud-sdk/bin" ]; then rm -rf $HOME/google-cloud-sdk;
curl https://sdk.cloud.google.com | bash; fi
- source $HOME/google-cloud-sdk/path.bash.inc
- gcloud --quiet components install kubectl
- gcloud --quiet version
- openssl aes-256-cbc -K $encrypted_a1eb99cfc21e_key -iv $encrypted_a1eb99cfc21e_iv -in travis_secrets.tar.gz.enc -out travis_secrets.tar.gz -d
- tar -xzf travis_secrets.tar.gz
- gcloud auth activate-service-account --key-file service_key.json
- rm -f service_key.json
- openssl aes-256-cbc -K $encrypted_555d9b2948d2_key -iv $encrypted_555d9b2948d2_iv
-in client_secrets.json.enc -d | gcloud auth activate-service-account --key-file /dev/stdin
- go get github.com/google/trillian/server/trillian_log_server
- go get github.com/google/trillian/server/trillian_log_signer
- go get github.com/google/trillian/server/trillian_map_server
View
Binary file not shown.
View
Binary file not shown.

0 comments on commit a2c69e0

Please sign in to comment.