diff --git a/hack/storage-version-migration.sh b/hack/storage-version-migration.sh index 503f95d68..6176bc9a4 100755 --- a/hack/storage-version-migration.sh +++ b/hack/storage-version-migration.sh @@ -98,7 +98,7 @@ EOF JOB_NAME=$(kubectl -n shipwright-build get job --selector app=storage-version-migration-shipwright -o jsonpath='{.items[0].metadata.name}') -while [ "$(kubectl -n shipwright-build get job "${JOB_NAME}" -o json | jq -r '.status.completionTime // ""')" == "" ]; do +while [ "$(kubectl -n shipwright-build get job "${JOB_NAME}" -o json | jq -r '.status.conditions[]? | select((.type == "Complete" or .type == "Failed") and .status == "True") | .type')" == "" ]; do echo "[INFO] Storage version migraton job is still running" sleep 10 done @@ -116,4 +116,4 @@ if [ "${isFailed}" == "True" ]; then exit 1 fi -echo "[DONE]" \ No newline at end of file +echo "[DONE]"