We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e4671fc commit c211184Copy full SHA for c211184
1 file changed
kokoro/scripts/test/go_test.sh
@@ -143,6 +143,17 @@ if [[ -n "${PLATFORMS:-}" ]]; then
143
IMAGE_SPECS="${PLATFORMS}"
144
fi
145
146
+# TODO(b/502589964): force test VMs to run in the same zone as the kokoro worker.
147
+# The worker is not guaranteed to run in a zone where ARM machines are available,
148
+# so don't do this for ARM tests.
149
+if [[ "${ARCH:-}" != "aarch64" ]]; then
150
+ ZONE_METADATA=$(curl -s -H "Metadata-Flavor: Google" http://169.254.169.254/computeMetadata/v1/instance/zone)
151
+ if [[ $? -eq 0 ]] && [[ -n "$ZONE_METADATA" ]]; then
152
+ ZONE_METADATA="${ZONE_METADATA%/}"
153
+ export ZONES="${ZONE_METADATA##*/}"
154
+ fi
155
+fi
156
+
157
set_image_specs
158
set_zones
159
0 commit comments