From 5803301be76cd712e54965d13d7a98f43e883dfa Mon Sep 17 00:00:00 2001 From: "Randal S. Harisch" Date: Thu, 28 Sep 2023 14:15:24 -0600 Subject: [PATCH] chore: added e2e completion verification to script --- pipeline/notification.yaml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pipeline/notification.yaml b/pipeline/notification.yaml index a933612..acd0aa6 100644 --- a/pipeline/notification.yaml +++ b/pipeline/notification.yaml @@ -336,6 +336,12 @@ spec: persistentVolumeClaim: claimName: "pvc-conversion" EOF + MYJOB=$(oc get jobs -l app=e22-test -o name) + x=0; until [[ -n $(oc -n goghvideo-test-${RANDOMID} get ${MYJOB} 2>/dev/null ) || $x -eq 60 ]]; do echo "Waiting for e2e job to start" && sleep 2 && ((x++)); done + if [[ "${x}" -eq 60 ]]; then exit 1; fi + + x=0; until [[ $(oc -n goghvideo-test-${RANDOMID} get ${MYJOB} -o jsonpath="{.status.succeeded}") -gt 0 || $x -eq 20 ]]; do echo "Waiting for test to complete" && sleep 15 && ((x++)); done + if [[ "${x}" -eq 20 ]]; then exit 1; fi workspaces: - name: kubeconfig-dir workspace: dockerconfig