ci: install Google Cloud SDK in a retry loop to fix tar: write error
@@ -285,13 +285,22 @@ ifneq ($(GOOS),windows)
openssl aes-256-cbc -K "$(CREDENTIAL_ENCRYPTION_KEY)" -iv "$(CREDENTIAL_ENCRYPTION_IV)" -in tools/boto.enc -out tools/.boto -d
ifeq ($(GOARCH),amd64)
- if [ ! -d $(HOME)/google-cloud-sdk ]; then curl https://sdk.cloud.google.com | CLOUDSDK_CORE_DISABLE_PROMPTS=1 bash; fi
+ $(MAKE) install-google-cloud-sdk-if-not-present
$(HOME)/google-cloud-sdk/bin/gcloud auth activate-service-account --key-file repo/blob/gcs/test_service_account.json
endif
endif
endif
+install-google-cloud-sdk-if-not-present:
+ if [ ! -d $(HOME)/google-cloud-sdk ]; then $(retry) $(MAKE) install-google-cloud-sdk; fi
+
+install-google-cloud-sdk:
+ -rm -rf $(HOME)/google-cloud-sdk
+ echo Installing Google Cloud SDK.
+ curl https://sdk.cloud.google.com | CLOUDSDK_CORE_DISABLE_PROMPTS=1 bash 2>/dev/null
+ echo Finished Installing Google Cloud SDK.
+
RELEASE_STAGING_DIR=$(CURDIR)/.release
stage-release:
