From 0fb95f95d2af7bcc2529f896fec9904b3357b580 Mon Sep 17 00:00:00 2001 From: Ed Santiago Date: Wed, 21 Sep 2022 14:33:18 -0600 Subject: CI: only make install.tools when needed Reintroduce .install.foo targets into Makefile, and invoke only the bare-minimum ones needed for each individual CI step in setup_environment.sh. Also add a retry to the golangci-lint curl, in hopes of dealing with network flakes. And remove the -f (fail) because it produces unhelpful logs. Reason: saw about 25% CI flakes yesterday due to the golangci-lint fetch, something about a timeout, and this was especially frustrating because none of the steps actually needed lint. Quick reminder: avoid network fetches unless absolutely necessary. Fixes: #15892 Signed-off-by: Ed Santiago --- Makefile | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index a42f1f181..f62273965 100644 --- a/Makefile +++ b/Makefile @@ -850,12 +850,20 @@ endif .PHONY: install.tools install.tools: .install.ginkgo .install.golangci-lint ## Install needed tools - make -C test/tools + $(MAKE) -C test/tools + +.PHONY: .install.goimports +.install.goimports: + $(MAKE) -C test/tools build/goimports .PHONY: .install.ginkgo .install.ginkgo: $(GO) install $(BUILDFLAGS) ./vendor/github.com/onsi/ginkgo/ginkgo +.PHONY: .install.gitvalidation +.install.gitvalidation: + $(MAKE) -C test/tools build/git-validation + .PHONY: .install.golangci-lint .install.golangci-lint: VERSION=1.46.2 ./hack/install_golangci.sh @@ -863,7 +871,7 @@ install.tools: .install.ginkgo .install.golangci-lint ## Install needed tools .PHONY: .install.md2man .install.md2man: if [ ! -x "$(GOMD2MAN)" ]; then \ - make -C test/tools build/go-md2man ; \ + $(MAKE) -C test/tools build/go-md2man ; \ fi .PHONY: .install.pre-commit -- cgit v1.2.3-54-g00ecf