Skip to content

Commit

Permalink
maint: cleanup release (#250)
Browse files Browse the repository at this point in the history
## 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
helm/chart-releaser#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.
  • Loading branch information
TylerHelmuth authored May 23, 2023
1 parent 3175b52 commit f96e8d6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
1 change: 0 additions & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 2 additions & 3 deletions .circleci/release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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)}"

Expand Down Expand Up @@ -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

0 comments on commit f96e8d6

Please sign in to comment.