From 987e9c8bb51f9e449ba194b5e2bd2a7340d764ea Mon Sep 17 00:00:00 2001 From: Michael Adam Date: Mon, 23 Jun 2025 12:47:46 +0200 Subject: [PATCH] build: merge helm indexes instead of recreating for every release (really) A new helm repo index was created from scratch for every new release which meant that the release timestamps in the index were basically all identical. This change intends to fix that by merging the new index with the existing one The first attempt to fix this (PR #16033) did not work properly. This change is intended to fix the issue for good by closing the gap the previuous PR has left. Fixes: #15604 Co-Authored-By: Travis Nielsen Signed-off-by: Michael Adam --- build/release/Makefile | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/build/release/Makefile b/build/release/Makefile index 7dd07501b..df8002b5f 100644 --- a/build/release/Makefile +++ b/build/release/Makefile @@ -120,9 +120,14 @@ HELM_URL := $(HELM_BASE_URL)/$(HELM_CHANNEL) promote.helm: $(HELM) # copy existing charts to a temp dir, then combine with new charts, reindex, and upload $(S3_SYNC) s3://$(HELM_S3_BUCKET)/$(HELM_CHANNEL) $(HELM_TEMP) + # delete unnecessary files: + rm -fr $(HELM_TEMP)/*tgz + # rename current index to distinguish the previous file. + mv $(HELM_TEMP)/index.yaml $(HELM_TEMP)/previous_index.yaml $(S3_SYNC) s3://$(S3_BUCKET)/build/$(BRANCH_NAME)/$(VERSION)/charts $(HELM_TEMP) - $(HELM) repo index --url $(HELM_URL) --merge $(HELM_TEMP)/index.yaml $(HELM_TEMP) - $(S3_SYNC_DEL) $(HELM_TEMP) s3://$(HELM_S3_BUCKET)/$(HELM_CHANNEL) + $(HELM) repo index --url $(HELM_URL) --merge $(HELM_TEMP)/previous_index.yaml $(HELM_TEMP) + rm -f $(HELM_TEMP)/previous_index.yaml + $(S3_SYNC) $(HELM_TEMP) s3://$(HELM_S3_BUCKET)/$(HELM_CHANNEL) rm -fr $(HELM_TEMP) # set the helm cart version number.