diff --git a/.github/workflows/pr-tests-helm-upgrade.yml b/.github/workflows/pr-tests-helm-upgrade.yml index 54909f4796d..648613e29a3 100644 --- a/.github/workflows/pr-tests-helm-upgrade.yml +++ b/.github/workflows/pr-tests-helm-upgrade.yml @@ -15,9 +15,15 @@ on: workflow_dispatch: inputs: - none: - description: "Run helm upgrade" + upgrade_type: + description: "Select upgrade path type" required: false + default: "BetaToDev" + type: choice + options: + - BetaToDev + - ProdToBeta + - ProdToDev concurrency: group: pr-tests-helm-upgrade @@ -52,7 +58,8 @@ jobs: run: | eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)" - UPGRADE_TYPE=BetaToDev tox -e syft.test.helm.upgrade + # default upgrade is beta to dev + UPGRADE_TYPE=${{ github.event.inputs.upgrade_type }} tox -e syft.test.helm.upgrade - name: Destroy cluster if: always() diff --git a/packages/grid/scripts/helm_upgrade.sh b/packages/grid/scripts/helm_upgrade.sh index 4b1831690de..82418eaa99a 100644 --- a/packages/grid/scripts/helm_upgrade.sh +++ b/packages/grid/scripts/helm_upgrade.sh @@ -13,7 +13,7 @@ PROD="openmined/syft" BETA="openmined/syft --devel" DEV="./helm/syft" -if [ "$UPGRADE_TYPE" == "ProdToDev" ]; then +if [ "$UPGRADE_TYPE" == "ProdToBeta" ]; then INSTALL_SOURCE=$PROD # latest published prod UPGRADE_SOURCE=$BETA # latest published beta INSTALL_ARGS="" @@ -23,6 +23,11 @@ elif [ "$UPGRADE_TYPE" == "BetaToDev" ]; then UPGRADE_SOURCE=$DEV # local chart INSTALL_ARGS="" UPGRADE_ARGS="" +elif [ "$UPGRADE_TYPE" == "ProdToDev" ]; then + INSTALL_SOURCE=$PROD # latest published prod + UPGRADE_SOURCE=$DEV # local chart + INSTALL_ARGS="" + UPGRADE_ARGS="" else echo Invalid upgrade type $UPGRADE_TYPE exit 1 diff --git a/tox.ini b/tox.ini index c7989f8aa6a..6577929ee25 100644 --- a/tox.ini +++ b/tox.ini @@ -922,7 +922,7 @@ description = Test helm upgrade changedir = {toxinidir}/packages/grid/ passenv=HOME,USER,KUBE_CONTEXT setenv = - UPGRADE_TYPE = {env:UPGRADE_TYPE:ProdToDev} + UPGRADE_TYPE = {env:UPGRADE_TYPE:ProdToBeta} allowlist_externals = bash commands =