From 00870f53c7a631827df59fe62b8c4d1f5ee7c1a3 Mon Sep 17 00:00:00 2001 From: David Fluck Date: Sat, 26 Oct 2024 15:11:29 -0400 Subject: [PATCH] build: INFENG-937: Publish Helm chart release candidates (#10141) INFENG-937: Publish Helm RCs Add Helm makefile and CircleCI job to publish Helm chart release candidates. This is necessary to properly deploy release candidates onto the new release party cluster. Previously, bumpversion adjusted the chart version in Chart.yaml and committed that to the release branch, then rph used this in-tree version as a chart repository to do GKE cluster upgrades during testing. This is no longer possible, though, so we need to publish these release candidate versions. (We should probably be doing this anyway, in the interest of transparency.) This will create an additional GitHub release every time we cut a release candidate. --- .circleci/real_config.yml | 20 ++++++++++++++++++++ helm/Makefile | 12 ++++++++++++ 2 files changed, 32 insertions(+) diff --git a/.circleci/real_config.yml b/.circleci/real_config.yml index a5c92919fee..ee3f2b1bce4 100644 --- a/.circleci/real_config.yml +++ b/.circleci/real_config.yml @@ -1910,6 +1910,20 @@ jobs: command: make -C agent release-ee - run: mkdir /tmp/pkgs && cp -v */dist/*.{rpm,deb,tar.gz} /tmp/pkgs + publish-helm-gh-rc: + docker: + - image: <> + environment: + GO111MODULE: "on" + steps: + - checkout + - attach_workspace: + at: . + - reinstall-go + - make-component: + component: helm + target: release-gh-rc + publish-helm-gh: parameters: ee: @@ -5576,6 +5590,12 @@ workflows: context: determined-production filters: *release-filters + - publish-helm-gh-rc: + requires: + - build-helm + context: determined-production + filters: *rc-filters + - upload-try-now-template: context: determined-production filters: *release-filters diff --git a/helm/Makefile b/helm/Makefile index 8e2f5657bab..87b97a8f44f 100644 --- a/helm/Makefile +++ b/helm/Makefile @@ -26,6 +26,18 @@ release-gh: git clean -df goreleaser --rm-dist +.PHONY: release-gh-rc +release-gh-rc: export GORELEASER_CURRENT_TAG := $(VERSION_TAG) +# The following line lists all tags by creation date, finds the current tag and +# the next line after, then prints that second line, which should be the most +# recent previous tag. This works if the previous tag is both a minor release, +# or an rc release. +release-gh-rc: export GORELEASER_PREVIOUS_TAG := $(shell git tag --sort=-creatordate | grep "$(VERSION_TAG)" -A1 | sed -n '2 p') +release-gh-rc: + go install github.com/goreleaser/goreleaser@v1.14.1 + git clean -df + goreleaser --rm-dist + .PHONY: release-gh-dryrun release-gh-dryrun: export GORELEASER_CURRENT_TAG := $(VERSION_TAG) release-gh-dryrun: export GORELEASER_PREVIOUS_TAG := $(shell git tag --sort=-creatordate | grep -E '^[0-9.]+$$' | grep "$(VERSION_TAG)" -A1 | sed -n '2 p')