Skip to content

Commit 56febf6

Browse files
authored
Merge pull request rook#16041 from obnoxxx/build-helm-index-merge-again
build: merge helm indexes instead of recreating for every release
2 parents 7de769c + 987e9c8 commit 56febf6

1 file changed

Lines changed: 7 additions & 2 deletions

File tree

build/release/Makefile

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -120,9 +120,14 @@ HELM_URL := $(HELM_BASE_URL)/$(HELM_CHANNEL)
120120
promote.helm: $(HELM)
121121
# copy existing charts to a temp dir, then combine with new charts, reindex, and upload
122122
$(S3_SYNC) s3://$(HELM_S3_BUCKET)/$(HELM_CHANNEL) $(HELM_TEMP)
123+
# delete unnecessary files:
124+
rm -fr $(HELM_TEMP)/*tgz
125+
# rename current index to distinguish the previous file.
126+
mv $(HELM_TEMP)/index.yaml $(HELM_TEMP)/previous_index.yaml
123127
$(S3_SYNC) s3://$(S3_BUCKET)/build/$(BRANCH_NAME)/$(VERSION)/charts $(HELM_TEMP)
124-
$(HELM) repo index --url $(HELM_URL) --merge $(HELM_TEMP)/index.yaml $(HELM_TEMP)
125-
$(S3_SYNC_DEL) $(HELM_TEMP) s3://$(HELM_S3_BUCKET)/$(HELM_CHANNEL)
128+
$(HELM) repo index --url $(HELM_URL) --merge $(HELM_TEMP)/previous_index.yaml $(HELM_TEMP)
129+
rm -f $(HELM_TEMP)/previous_index.yaml
130+
$(S3_SYNC) $(HELM_TEMP) s3://$(HELM_S3_BUCKET)/$(HELM_CHANNEL)
126131
rm -fr $(HELM_TEMP)
127132

128133
# set the helm cart version number.

0 commit comments

Comments
 (0)