From b6a283a245eb4f605927ef0bcd8b0bb0f328cc39 Mon Sep 17 00:00:00 2001 From: Pasquale Congiusti Date: Sat, 8 Feb 2025 11:07:55 +0100 Subject: [PATCH] fix(release): push staging images --- script/Makefile | 13 +++++++++++-- script/git_tag.sh | 10 +++++----- 2 files changed, 16 insertions(+), 7 deletions(-) diff --git a/script/Makefile b/script/Makefile index dffccf5cc7..0e1d9d564f 100644 --- a/script/Makefile +++ b/script/Makefile @@ -494,6 +494,12 @@ images-push-all: make IMAGE_PUSH=$(CUSTOM_IMAGE):$(CUSTOM_VERSION)-$$i images-push ; \ done +images-push-staging-all: + make IMAGE_PUSH=$(STAGING_IMAGE):$(CUSTOM_VERSION) images-push + for i in $(JDK_VERSIONS); do \ + make IMAGE_PUSH=$(STAGING_IMAGE):$(CUSTOM_VERSION)-$$i images-push ; \ + done + images-push: docker push $(IMAGE_PUSH) docker manifest create $(IMAGE_PUSH) $(IMAGE_PUSH) @@ -503,8 +509,11 @@ images-push: done docker manifest push $(IMAGE_PUSH) --purge -images-push-staging-all: +images-tag-staging-all: docker tag $(CUSTOM_IMAGE):$(CUSTOM_VERSION) $(STAGING_IMAGE):$(CUSTOM_VERSION) + for j in $(ARCH_VERSIONS); do \ + docker tag $(CUSTOM_IMAGE):$(CUSTOM_VERSION)-$$j $(STAGING_IMAGE):$(CUSTOM_VERSION)-$$j; \ + done; \ for i in $(JDK_VERSIONS); do \ docker tag $(CUSTOM_IMAGE):$(CUSTOM_VERSION)-$$i $(STAGING_IMAGE):$(CUSTOM_VERSION)-$$i; \ for j in $(ARCH_VERSIONS); do \ @@ -556,7 +565,7 @@ cross-compile: # be processed as a single argument by the cross compile script ./script/cross_compile.sh $(CUSTOM_VERSION) $(subst ","\",$(GOFLAGS)) -release-staging: clean codegen set-version check-licenses build-resources images-all images-push-staging-all cross-compile release-helm bundle-push-staging git-tag sbomgen +release-staging: clean codegen set-version check-licenses build-resources images-all images-tag-staging-all images-push-staging-all cross-compile release-helm bundle-push-staging git-tag sbomgen sbomgen: cyclonedx-gomod mod -licenses -json -output sbom.json diff --git a/script/git_tag.sh b/script/git_tag.sh index 39e891cd93..af1cff7c6e 100755 --- a/script/git_tag.sh +++ b/script/git_tag.sh @@ -28,14 +28,14 @@ target_tag=v$target_version target_staging=staging-$target_tag target_remote=$2 -git add * -git commit -m "chore(release): preparing $target_version" -git push +git add helm docs || true +git commit -m "chore(release): Helm chart for $target_version" +git push -f git branch -D ${target_staging} || true git checkout -b ${target_staging} -git add * || true -git commit -a -m "Release ${target_version}" || true +git add pkg/resources script || true +git commit -m "chore(release): preparing for tag v$target_version" || true git tag --force ${target_tag} ${target_staging} git push --force ${target_remote} ${target_tag}