Commit 295f1786 authored by Kubernetes Submit Queue's avatar Kubernetes Submit Queue Committed by GitHub

Merge pull request #31588 from ingvagabund/make-gcloud-compute-conditional

Automatic merge from submit-queue node e2e script: call 'gcloud compute' only if necessary **What this PR does / why we need it**: 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. **Special notes for your reviewer**: First introduced here: https://github.com/kubernetes/kubernetes/pull/29815
parents 8675adf1 8f28091c
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment