Skip to content

Commit

Permalink
fix: Update helm charts publishing (#3260)
Browse files Browse the repository at this point in the history
Signed-off-by: Daniil Fedotov <[email protected]>
  • Loading branch information
hairyhum authored Jan 10, 2025
1 parent 3763aec commit bda1d1f
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 18 deletions.
3 changes: 0 additions & 3 deletions .github/workflows/publish_docs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,6 @@ jobs:
echo "{\"version\":\"${RELEASE_TAG}\"}" > ./.vitepress/version.json
pnpm docs:build
working-directory: ./docs_new
- name: Download the helm index
run: |
curl https://github.com/kanisterio/kanister/releases/download/${RELEASE_TAG}/helm_index.yaml -f -L -o docs_new/.vitepress/dist/index.yaml
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
Expand Down
30 changes: 18 additions & 12 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -84,14 +84,8 @@ jobs:
with:
ref: ${{ env.RELEASE_TAG }}
fetch-depth: 0
- name: build helm charts
run: |
export PACKAGE_FOLDER=helm_package
export HELM_RELEASE_REPO_URL=https://github.com/kanisterio/kanister/releases/download/${RELEASE_TAG}
export HELM_RELEASE_REPO_INDEX=https://charts.kanister.io/
make package-helm VERSION=${RELEASE_TAG}
- name: Free Disk Space (Ubuntu)
uses: jlumbroso/free-disk-space@54081f138730dfa15788a46383842cd2f914a1be # v1.3.1
# - name: Free Disk Space (Ubuntu)
# uses: jlumbroso/free-disk-space@54081f138730dfa15788a46383842cd2f914a1be # v1.3.1
- name: gorelease
run: make gorelease
env:
Expand All @@ -118,13 +112,25 @@ jobs:
GH_TOKEN: ${{ secrets.GH_TOKEN }}
RELEASE_TAG: ${{ needs.run_if.outputs.release_tag }}
steps:
- name: clone helm pages
- name: Checkout kanister repo
uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2
with:
ref: ${{ env.RELEASE_TAG }}
- name: Build helm charts
run: |
export PACKAGE_FOLDER=helm_package
export HELM_RELEASE_REPO_URL=https://github.com/kanisterio/kanister/releases/download/${RELEASE_TAG}
export HELM_RELEASE_REPO_INDEX=https://charts.kanister.io/index.yaml
make package-helm VERSION=${RELEASE_TAG}
- name: Upload chart archives to release
run: |
gh release upload ${RELEASE_TAG} helm_package/kanister-operator-*
- name: Clone charts pages repo
run: |
git clone https://infraq:${GH_TOKEN}@github.com/kanisterio/kanister-charts
- name: Download the helm index
working-directory: ./kanister-charts
- name: Copy helm index
run: |
curl https://github.com/kanisterio/kanister/releases/download/${RELEASE_TAG}/helm_index.yaml -f -L -o index.yaml
cp ./helm_package/index.yaml ./kanister-charts/
- name: Commit changes
working-directory: ./kanister-charts
run: |
Expand Down
2 changes: 0 additions & 2 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@ release:
prerelease: auto
extra_files:
- glob: 'helm_package/kanister-operator-*.tgz'
- glob: 'helm_package/index.yaml'
name_template: helm_index.yaml
builds:
- id: kanctl
binary: kanctl
Expand Down
2 changes: 1 addition & 1 deletion build/package_helm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ main() {

local repo_args="--url ${HELM_RELEASE_REPO_URL}"

if curl ${HELM_RELEASE_REPO_INDEX} -o ${PACKAGE_FOLDER}/cur_index.yaml
if curl -L ${HELM_RELEASE_REPO_INDEX} -o ${PACKAGE_FOLDER}/cur_index.yaml
then
repo_args="${repo_args} --merge ${PACKAGE_FOLDER}/cur_index.yaml"
fi
Expand Down

0 comments on commit bda1d1f

Please sign in to comment.