From c673eb9e8766368c02ee8f7665755305ccb624c9 Mon Sep 17 00:00:00 2001 From: --show-origin Date: Tue, 27 Feb 2024 05:07:30 -0800 Subject: [PATCH 1/2] ci(helm-test): add upgrade check --- .github/workflows/helm-test.yml | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/.github/workflows/helm-test.yml b/.github/workflows/helm-test.yml index 14565378..b7dc4121 100644 --- a/.github/workflows/helm-test.yml +++ b/.github/workflows/helm-test.yml @@ -1,5 +1,5 @@ # -# Copyright (c) 2023 Contributors to the Eclipse Foundation +# Copyright (c) 2023,2024 Contributors to the Eclipse Foundation # # See the NOTICE file(s) distributed with this work for additional # information regarding copyright ownership. @@ -30,6 +30,12 @@ on: default: 'kindest/node:v1.27.3' required: false type: string + upgrade_from: + description: 'chart version to upgrade from' + # chart version from 3.1 release as default + default: '1.0.0' + required: false + type: string helm_version: description: 'helm version to test (default = latest)' default: 'latest' @@ -105,3 +111,14 @@ jobs: helm repo add postgresql https://charts.bitnami.com/bitnami ct install --charts charts/puris --helm-extra-set-args "--set backend.image.repository=${{ env.REGISTRY }}/${{ env.APP_BACKEND_NAME}} --set backend.image.tag=${{ env.TAG }} --set frontend.image.repository=${{ env.REGISTRY }}/${{ env.APP_FRONTEND_NAME }} --set frontend.image.tag=${{ env.TAG }}" if: github.event_name != 'pull_request' || steps.list-changed.outputs.changed == 'true' + + # Upgrade the released chart version with the locally available chart + # default value for event_name != workflow_dispatch + - name: Run helm upgrade + run: | + helm repo add bitnami https://charts.bitnami.com/bitnami + helm repo add postgresql https://charts.bitnami.com/bitnami + helm install puris charts/puris --version ${{ github.event.inputs.upgrade_from || '1.0.0' }} + helm dependency update charts/puris + helm upgrade [NAME] charts/puris + if: github.event_name != 'pull_request' || steps.list-changed.outputs.changed == 'true' From f9caf2c26ea35e20840f527484a359c8658d61f9 Mon Sep 17 00:00:00 2001 From: --show-origin Date: Tue, 27 Feb 2024 06:39:33 -0800 Subject: [PATCH 2/2] ci(helm-test): use tractusx chart repository for first installation in upgrade --- .github/workflows/helm-test.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/helm-test.yml b/.github/workflows/helm-test.yml index b7dc4121..9f5e0011 100644 --- a/.github/workflows/helm-test.yml +++ b/.github/workflows/helm-test.yml @@ -32,7 +32,7 @@ on: type: string upgrade_from: description: 'chart version to upgrade from' - # chart version from 3.1 release as default + # chart version from 1.0.0 (R24.03) release as default default: '1.0.0' required: false type: string @@ -117,8 +117,8 @@ jobs: - name: Run helm upgrade run: | helm repo add bitnami https://charts.bitnami.com/bitnami - helm repo add postgresql https://charts.bitnami.com/bitnami - helm install puris charts/puris --version ${{ github.event.inputs.upgrade_from || '1.0.0' }} + helm repo add tractusx-dev https://eclipse-tractusx.github.io/charts/ + helm install puris tractusx-dev/puris --version ${{ github.event.inputs.upgrade_from || '1.0.0' }} helm dependency update charts/puris - helm upgrade [NAME] charts/puris + helm upgrade puris charts/puris if: github.event_name != 'pull_request' || steps.list-changed.outputs.changed == 'true'