Skip to content

Commit

Permalink
fix(release): push staging images
Browse files Browse the repository at this point in the history
  • Loading branch information
squakez committed Feb 8, 2025
1 parent 75878ef commit b6a283a
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 7 deletions.
13 changes: 11 additions & 2 deletions script/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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 \
Expand Down Expand Up @@ -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
Expand Down
10 changes: 5 additions & 5 deletions script/git_tag.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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}
Expand Down

0 comments on commit b6a283a

Please sign in to comment.