Skip to content

Commit 994f686

Browse files
committed
Added options for unauthenticated usage
1 parent 76877fd commit 994f686

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

.travis.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@ cache:
55
directories:
66
- $HOME/gcloud/
77
env:
8-
- GCLOUD=$HOME/gcloud/google-cloud-sdk/bin CLOUDSDK_PYTHON_SITEPACKAGES=1 GOOGLE_APPLICATION_CREDENTIALS=$TRAVIS_BUILD_DIR/client_secrets.json
8+
- GCLOUD=$HOME/gcloud/google-cloud-sdk/bin GOOGLE_APPLICATION_CREDENTIALS=$TRAVIS_BUILD_DIR/client_secrets.json #Other environment variables on same line
99

1010
before_install:
11-
#ENCRYPT YOUR PRIVATE KEY
11+
#ENCRYPT YOUR PRIVATE KEY (If you need authentication)
1212
# 1. Install and login to the Travis CLI:
1313
# $ gem install travis
1414
# $ travis login
@@ -28,7 +28,9 @@ before_install:
2828
cd $TRAVIS_BUILD_DIR;
2929
fi
3030
- printf 'y\n' | $GCLOUD/gcloud components update
31-
- gcloud auth activate-service-account --key-file client_secrets.json
31+
- if [ -a client_secrets.json ]; then
32+
gcloud auth activate-service-account --key-file client_secrets.json;
33+
fi
3234

3335
install:
3436
#Add app specific setup here

0 commit comments

Comments
 (0)