From 8f28091c97a7911cf7902d98025bf6ab420e9a8f Mon Sep 17 00:00:00 2001 From: Jan Chaloupka Date: Sun, 28 Aug 2016 10:34:59 +0200 Subject: [PATCH] Call 'gcloud compute' only if necessary The 'gcloud compute' is called everytime even if it is not needed. When runnin node e2e tests on RHEL, the test-e2e-node.sh script is run the way in which it takes execution path without gcloud invocation. With the current code, gcloud is called everytime. Thus introducing additional runtime dependency. --- hack/make-rules/test-e2e-node.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hack/make-rules/test-e2e-node.sh b/hack/make-rules/test-e2e-node.sh index eaaf2223f37..3ff15b7b96b 100755 --- a/hack/make-rules/test-e2e-node.sh +++ b/hack/make-rules/test-e2e-node.sh @@ -33,9 +33,9 @@ images=${IMAGES:-""} hosts=${HOSTS:-""} metadata=${INSTANCE_METADATA:-""} gubernator=${GUBERNATOR:-"false"} -gci_image=$(gcloud compute images list --project google-containers \ - --no-standard-images --regexp="gci-dev.*" --format="table[no-heading](name)") if [[ $hosts == "" && $images == "" ]]; then + gci_image=$(gcloud compute images list --project google-containers \ + --no-standard-images --regexp="gci-dev.*" --format="table[no-heading](name)") images=$gci_image metadata="user-data<${KUBE_ROOT}/test/e2e_node/jenkins/gci-init.yaml" fi