From 0ed2982d244f2a95dd52804205ee66f19f841ced Mon Sep 17 00:00:00 2001 From: Pedro Coutinho Date: Thu, 5 Dec 2024 10:16:23 -0800 Subject: [PATCH] Split downloading and untarring docker-credential-gcr to make the target (#9560) more robust. This way, if the download fails, make will stop there. Also, added retry to curl command for a little more robustness. --- lib.Makefile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib.Makefile b/lib.Makefile index bc3078f9a6c..aadb7f6fb8e 100644 --- a/lib.Makefile +++ b/lib.Makefile @@ -1447,9 +1447,9 @@ DOCKER_CREDENTIAL_OS="linux" DOCKER_CREDENTIAL_ARCH="amd64" $(WINDOWS_DIST)/bin/docker-credential-gcr: -mkdir -p $(WINDOWS_DIST)/bin - curl -fsSL "https://github.com/GoogleCloudPlatform/docker-credential-gcr/releases/download/v$(DOCKER_CREDENTIAL_VERSION)/docker-credential-gcr_$(DOCKER_CREDENTIAL_OS)_$(DOCKER_CREDENTIAL_ARCH)-$(DOCKER_CREDENTIAL_VERSION).tar.gz" \ - | tar xz --to-stdout docker-credential-gcr \ - | tee $(WINDOWS_DIST)/bin/docker-credential-gcr > /dev/null && chmod +x $(WINDOWS_DIST)/bin/docker-credential-gcr + curl -fsSL --retry 5 "https://github.com/GoogleCloudPlatform/docker-credential-gcr/releases/download/v$(DOCKER_CREDENTIAL_VERSION)/docker-credential-gcr_$(DOCKER_CREDENTIAL_OS)_$(DOCKER_CREDENTIAL_ARCH)-$(DOCKER_CREDENTIAL_VERSION).tar.gz" -o docker-credential-gcr.tar.gz + tar xzf docker-credential-gcr.tar.gz --to-stdout docker-credential-gcr | tee $@ > /dev/null && chmod +x $@ + rm -f docker-credential-gcr.tar.gz .PHONY: docker-credential-gcr-binary docker-credential-gcr-binary: var-require-all-WINDOWS_DIST-DOCKER_CREDENTIAL_VERSION-DOCKER_CREDENTIAL_OS-DOCKER_CREDENTIAL_ARCH $(WINDOWS_DIST)/bin/docker-credential-gcr