Skip to content

Commit

Permalink
Merge pull request #3579 from mathesar-foundation/action_reset_demo
Browse files Browse the repository at this point in the history
Updates to GH workflow for resetting demo
  • Loading branch information
pavish committed May 10, 2024
2 parents 3e27342 + b072619 commit b718c62
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions .github/workflows/reset-demo.yml
Expand Up @@ -6,7 +6,7 @@ on:
- master
workflow_dispatch:
schedule:
- cron: '1,9,17,30,45 6,7,8 * * *'
- cron: '30 6 * * *'


env:
Expand Down Expand Up @@ -34,17 +34,19 @@ jobs:
location: ${{ env.GKE_ZONE }}

- name: Delete existing demo deployment
run: kubectl delete deployments.apps demo-serve
run: kubectl delete deployments.apps demo-serve --ignore-not-found=true

- name: Wait until all pods are removed
run: >-
attempts=10
until [ $attempts -le 0 ] || [ -z "$(kubectl get pods)" ]; do
sleep 5
attempts=$((attempts - 1))
attempts=10;
until [ $attempts -le 0 ] || [ -z "$(kubectl get pods --selector=run=demo-serve)" ];
do
sleep 5;
attempts=$((attempts - 1));
done
if [ $attempts -le 0 ]; then
return 1
if [ $attempts -le 0 ];
then
return 1;
fi
- name: Deploy demo
Expand Down

0 comments on commit b718c62

Please sign in to comment.