Skip to content

Commit 1a15dd6

Browse files
Install gcloud on Travis for integration test setup (#2277)
Caches install; downloads only if updates available. Addresses #2118.
1 parent 84604a5 commit 1a15dd6

2 files changed

Lines changed: 14 additions & 0 deletions

File tree

.travis.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@ before_install:
1616
- cp target/travis/logging.properties logging.properties
1717
install: mvn install --quiet -Djava.util.logging.config.file=logging.properties -DskipTests=true
1818
-Dgpg.skip=true
19+
cache:
20+
directories:
21+
- "$HOME/google-cloud-sdk/"
1922
script:
2023
- travis_wait 60 utilities/verify.sh
2124
after_success:

utilities/integration_test_env.sh

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,14 @@
1+
# Ensure latest Google Cloud SDK installed, for commands below
2+
if [ ! -d "$HOME/google-cloud-sdk/bin" ]
3+
then
4+
rm -rf "$HOME/google-cloud-sdk"
5+
export CLOUDSDK_CORE_DISABLE_PROMPTS=1
6+
curl https://sdk.cloud.google.com | bash
7+
fi
8+
gcloud components update
9+
source "$HOME/google-cloud-sdk/path.bash.inc"
10+
gcloud version
11+
112
# Remove orphaned firewall rules and networks generated by unintentional aborted runs of
213
# google-cloud-node on gapic-test project: see
314
# https://github.com/GoogleCloudPlatform/google-cloud-java/issues/2118

0 commit comments

Comments
 (0)