Merge pull request #127363 from bouaouda-achraf/gcloud-info-format-error

fix(e2e-node-tests): project and zone in the prerequisites check
This commit is contained in:
Kubernetes Prow Robot
2024-09-20 00:25:20 +01:00
committed by GitHub

View File

@@ -132,6 +132,7 @@ if [ "${remote}" = true ] && [ "${remote_mode}" = gce ] ; then
# Get the compute zone
zone=${ZONE:-"$(gcloud info --format='value(config.properties.compute.zone.value)')"}
zone=${zone// /}
if [[ ${zone} == "" ]]; then
echo "Could not find gcloud compute/zone when running: \`gcloud info --format='value(config.properties.compute.zone.value)'\`"
exit 1
@@ -139,6 +140,7 @@ if [ "${remote}" = true ] && [ "${remote_mode}" = gce ] ; then
# Get the compute project
project=$(gcloud info --format='value(config.project)')
project=${project// /}
if [[ ${project} == "" ]]; then
echo "Could not find gcloud project when running: \`gcloud info --format='value(config.project)'\`"
exit 1