mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-09-14 13:45:06 +00:00
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:
@@ -132,6 +132,7 @@ if [ "${remote}" = true ] && [ "${remote_mode}" = gce ] ; then
|
|||||||
|
|
||||||
# Get the compute zone
|
# Get the compute zone
|
||||||
zone=${ZONE:-"$(gcloud info --format='value(config.properties.compute.zone.value)')"}
|
zone=${ZONE:-"$(gcloud info --format='value(config.properties.compute.zone.value)')"}
|
||||||
|
zone=${zone// /}
|
||||||
if [[ ${zone} == "" ]]; then
|
if [[ ${zone} == "" ]]; then
|
||||||
echo "Could not find gcloud compute/zone when running: \`gcloud info --format='value(config.properties.compute.zone.value)'\`"
|
echo "Could not find gcloud compute/zone when running: \`gcloud info --format='value(config.properties.compute.zone.value)'\`"
|
||||||
exit 1
|
exit 1
|
||||||
@@ -139,6 +140,7 @@ if [ "${remote}" = true ] && [ "${remote_mode}" = gce ] ; then
|
|||||||
|
|
||||||
# Get the compute project
|
# Get the compute project
|
||||||
project=$(gcloud info --format='value(config.project)')
|
project=$(gcloud info --format='value(config.project)')
|
||||||
|
project=${project// /}
|
||||||
if [[ ${project} == "" ]]; then
|
if [[ ${project} == "" ]]; then
|
||||||
echo "Could not find gcloud project when running: \`gcloud info --format='value(config.project)'\`"
|
echo "Could not find gcloud project when running: \`gcloud info --format='value(config.project)'\`"
|
||||||
exit 1
|
exit 1
|
||||||
|
Reference in New Issue
Block a user