From f96e8d6edf7a955bcbe261803166f968aab0a216 Mon Sep 17 00:00:00 2001 From: Tyler Helmuth <12352919+TylerHelmuth@users.noreply.github.com> Date: Tue, 23 May 2023 15:10:37 -0400 Subject: [PATCH] maint: cleanup release (#250) ## Which problem is this PR solving? With the bump to chart releaser 1.5.0 we lost the ability to do `cr index` with an `ssh` git remote; the tool now requires us to use an `https` remote. For the `v1.2.3-secure-tenancy` release I had to do the `cr index` step manually from my laptop. See and https://github.com/helm/chart-releaser/issues/124. The PR solves this problem and also removes some deprecated flags and unused env vars. ## Short description of the changes - set git remote to https url for `cr index` step. - remove unused `--charts-repo` flag - remove unused variables. ## How to verify that this has the expected result I couldn't :/ but I'll try to do a honeycomb chart release once this is merged to test it. --- .circleci/config.yml | 1 - .circleci/release.sh | 5 ++--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 93c910e7..49b6c544 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -29,7 +29,6 @@ jobs: - run: command: | echo "export GIT_USERNAME=$CIRCLE_USERNAME" >> $BASH_ENV - echo "export GIT_REPOSITORY_URL=$CIRCLE_REPOSITORY_URL" >> $BASH_ENV echo "export GIT_REPOSITORY_OWNER=$CIRCLE_PROJECT_USERNAME" >> $BASH_ENV echo "export GIT_REPOSITORY_NAME=$CIRCLE_PROJECT_REPONAME" >> $BASH_ENV .circleci/install_tools.sh diff --git a/.circleci/release.sh b/.circleci/release.sh index 808c36f8..ab06e0f6 100755 --- a/.circleci/release.sh +++ b/.circleci/release.sh @@ -6,10 +6,8 @@ set -o pipefail : "${GITHUB_TOKEN:?Environment variable GITHUB_TOKEN must be set}" : "${GIT_USERNAME:?Environment variable GIT_USERNAME must be set}" -: "${GIT_REPOSITORY_URL:?Environment variable GIT_REPOSITORY_URL must be set}" : "${GIT_REPOSITORY_OWNER:?Environment variable GIT_REPOSITORY_OWNER must be set}" : "${GIT_REPOSITORY_NAME:?Environment variable GIT_REPOSITORY_NAME must be set}" -: "${CHARTS_REPO:?Environment variable CHARTS_REPO must be set}" readonly REPO_ROOT="${REPO_ROOT:-$(git rev-parse --show-toplevel)}" @@ -66,9 +64,10 @@ release_charts() { update_index() { git config user.name "$GIT_USERNAME" + git remote set-url origin "https://github.com/$GIT_REPOSITORY_OWNER/$GIT_REPOSITORY_NAME.git" mkdir .cr-index - cr index --charts-repo "$CHARTS_REPO" --git-repo "$GIT_REPOSITORY_NAME" --owner "$GIT_REPOSITORY_OWNER" --token "$GITHUB_TOKEN" --push + cr index --git-repo "$GIT_REPOSITORY_NAME" --owner "$GIT_REPOSITORY_OWNER" --token "$GITHUB_TOKEN" --push } main