Skip to content

Commit

Permalink
[ci] add Prod to Dev + fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
yashgorana committed Feb 26, 2024
1 parent 15002fd commit bb30186
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 5 deletions.
13 changes: 10 additions & 3 deletions .github/workflows/pr-tests-helm-upgrade.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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()
Expand Down
7 changes: 6 additions & 1 deletion packages/grid/scripts/helm_upgrade.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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=""
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -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 =
Expand Down

0 comments on commit bb30186

Please sign in to comment.