From 98f499cbbc708aec7fa93a542686e495f0d56206 Mon Sep 17 00:00:00 2001 From: Adam0Brien Date: Wed, 20 Nov 2024 11:30:53 +0000 Subject: [PATCH] wait for migration --- .github/workflows/e2e-test.yml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/.github/workflows/e2e-test.yml b/.github/workflows/e2e-test.yml index acd09f63..f71c1921 100644 --- a/.github/workflows/e2e-test.yml +++ b/.github/workflows/e2e-test.yml @@ -31,6 +31,17 @@ jobs: fi sleep 1 done + + MIGRATE_STATUS=$(kubectl get pods -l job-name=spicedb-cr-migrate -o jsonpath='{.items[0].status.phase}') + if [ "$MIGRATE_STATUS" = "Completed" ]; then + echo "SpiceDB migration completed." + break + elif [ "$MIGRATE_STATUS" = "Failed" ]; then + echo "SpiceDB migration failed." + exit 1 + fi + sleep 2 + done echo "Timeout reached while waiting for the test pod to complete." exit 1