-
-
Notifications
You must be signed in to change notification settings - Fork 2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
288b559
commit b95522d
Showing
3 changed files
with
92 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
name: PR Tests - Helm Upgrade | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- dev | ||
paths: | ||
- packages/grid/helm/syft/** | ||
|
||
workflow_dispatch: | ||
inputs: | ||
none: | ||
description: "Run helm upgrade" | ||
required: false | ||
|
||
jobs: | ||
pr-tests-helm-upgrade: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Install Dependencies | ||
if: steps.changes.outputs.syft == 'true' | ||
run: | | ||
pip install --upgrade tox | ||
- name: Upgrade helm on latest beta | ||
run: | | ||
tox -e dev.k8s.start | ||
tox -e syft.test.helm.upgrade | ||
tox -e dev.k8s.destroy |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
#! /bin/bash | ||
|
||
set -e | ||
|
||
HELM_REPO="openmined/syft" | ||
DOMAIN_NAME="test-domain" | ||
KUBE_NAMESPACE="syft" | ||
KUBE_CONTEXT=${KUBE_CONTEXT:-"k3d-syft-dev"} | ||
|
||
UPGRADE_TYPE=$1 | ||
|
||
PROD="openmined/syft" | ||
BETA="openmined/syft --devel" | ||
DEV="./helm/syft" | ||
|
||
if [ "$UPGRADE_TYPE" == "ProdToDev" ]; then | ||
INSTALL_SOURCE=$PROD # latest published prod | ||
UPGRADE_SOURCE=$BETA # latest published beta | ||
INSTALL_ARGS="" | ||
UPGRADE_ARGS="" | ||
elif [ "$UPGRADE_TYPE" == "BetaToDev" ]; then | ||
INSTALL_SOURCE=$BETA # latest published beta | ||
UPGRADE_SOURCE=$DEV # local chart | ||
INSTALL_ARGS="" | ||
UPGRADE_ARGS="" | ||
else | ||
echo Invalid upgrade type $UPGRADE_TYPE | ||
exit 1 | ||
fi | ||
|
||
kubectl config use-context $KUBE_CONTEXT | ||
kubectl delete namespace syft || true | ||
helm repo add openmined https://openmined.github.io/PySyft/helm | ||
helm repo update openmined | ||
|
||
echo Installing syft... $FROM_CMD | ||
helm install $DOMAIN_NAME $INSTALL_SOURCE $INSTALL_ARGS --namespace $KUBE_NAMESPACE --create-namespace | ||
helm ls -A | ||
|
||
WAIT_TIME=5 bash ./scripts/wait_for.sh service backend --namespace $KUBE_NAMESPACE | ||
WAIT_TIME=5 bash ./scripts/wait_for.sh pod default-pool-0 --namespace $KUBE_NAMESPACE | ||
|
||
echo Upgrading syft... $TO_CMD | ||
helm upgrade $DOMAIN_NAME $UPGRADE_SOURCE $UPGRADE_ARGS --namespace $KUBE_NAMESPACE | ||
helm ls -A | ||
|
||
echo "Post-upgrade sleep" && sleep 5 | ||
WAIT_TIME=5 bash ./scripts/wait_for.sh service backend --namespace $KUBE_NAMESPACE |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters