From e943896df59acb7553d33a0e0ea01dcf2bc19567 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fatih=20T=C3=BCrken?= Date: Fri, 20 Sep 2024 16:34:40 +0300 Subject: [PATCH] Add cleanupexamples tool to subpackages build process MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Fatih Türken --- cluster/images/provider-gcp/Makefile | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/cluster/images/provider-gcp/Makefile b/cluster/images/provider-gcp/Makefile index 3fccb545d..683f30d96 100755 --- a/cluster/images/provider-gcp/Makefile +++ b/cluster/images/provider-gcp/Makefile @@ -56,7 +56,10 @@ ifeq (-,$(findstring -,$(VERSION))) endif BUILD_ONLY ?= false STORE_PACKAGES ?= "" +XPKG_CLEANUP_EXAMPLES_VERSION ?= v0.12.1 batch-process: $(UP) + @rm -rf $(WORK_DIR)/xpkg-cleaned-examples + @GOOS=$(HOSTOS) GOARCH=$(TARGETARCH) go run github.com/upbound/uptest/cmd/cleanupexamples@$(XPKG_CLEANUP_EXAMPLES_VERSION) $(ROOT_DIR)/examples $(WORK_DIR)/xpkg-cleaned-examples || $(FAIL) @$(INFO) Batch processing smaller provider packages for: "$(SUBPACKAGES)" @mkdir -p "$(XPKG_OUTPUT_DIR)/$(PLATFORM)" && \ $(UP) xpkg batch --smaller-providers "$$(tr ' ' ',' <<< "$(SUBPACKAGES)")" \ @@ -69,7 +72,7 @@ batch-process: $(UP) --output-dir $(XPKG_OUTPUT_DIR) \ --store-packages "$(STORE_PACKAGES)" \ --build-only=$(BUILD_ONLY) \ - --examples-root $(ROOT_DIR)/examples \ + --examples-root $(WORK_DIR)/xpkg-cleaned-examples \ --examples-group-override monolith=* --examples-group-override config=providerconfig \ --auth-ext $(XPKG_DIR)/auth.yaml \ --crd-root $(XPKG_DIR)/crds \ @@ -80,3 +83,4 @@ batch-process: $(UP) --concurrency $(CONCURRENCY) \ --push-retry 10 || $(FAIL) @$(OK) Done processing smaller provider packages for: "$(SUBPACKAGES)" + @rm -rf $(WORK_DIR)/xpkg-cleaned-examples