Don't fail test when GOOGLE_APPLICATION_CREDENTIALS is unset
Workload identity is preferred in CI instead of GOOGLE_APPLICATION_CREDENTIALS
: "${PROJECT:=k8s-cri-containerd}"
# GOOGLE_APPLICATION_CREDENTIALS is the path of service account file.
-if [ -z "${GOOGLE_APPLICATION_CREDENTIALS:-""}" ]; then
- echo "GOOGLE_APPLICATION_CREDENTIALS is not set"
- exit 1
-fi
-
-# Activate gcloud service account.
+if [ -n "${GOOGLE_APPLICATION_CREDENTIALS:-}" ]; then
gcloud auth activate-service-account --key-file "${GOOGLE_APPLICATION_CREDENTIALS}" --project="${PROJECT}"
+fi
cat /etc/os-release
apt-get update
