diff --git a/pipeline/notification.yaml b/pipeline/notification.yaml index f6db8f8..f13326f 100644 --- a/pipeline/notification.yaml +++ b/pipeline/notification.yaml @@ -339,10 +339,10 @@ spec: EOF MYJOB=$(oc -n $(tasks.ephemeral-ns.results.namespace) get jobs -l app=e2e-test -o name) echo "Job Reference: ${MYJOB}" - x=0; until [[ -n $(oc -n $(tasks.ephemeral-ns.results.namespace) get ${MYJOB} -o jsonpath="{.status.active}") -gt 0 || $x -eq 60 ]]; do echo "Waiting for e2e job to start" && sleep 2 && ((x++)); done + x=0; until [[ $(oc -n $(tasks.ephemeral-ns.results.namespace) get ${MYJOB} -o go-template="{{if .status.active}}{{.status.active}}{{else}}0{{end}}") -gt 0 || $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 $(tasks.ephemeral-ns.results.namespace) get ${MYJOB} -o jsonpath="{.status.succeeded}") -gt 0 || $x -eq 20 ]]; do echo "Waiting for test to complete" && sleep 15 && ((x++)); done + x=0; until [[ $(oc -n $(tasks.ephemeral-ns.results.namespace) get ${MYJOB} -o go-template="{{if .status.succeeded}}{{.status.succeeded}}{{else}}0{{end}}" ) -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