chore: added direct reference to task result for namespace name
This commit is contained in:
@@ -300,6 +300,7 @@ spec:
|
||||
- name: SCRIPT
|
||||
value: |
|
||||
#!/usr/bin/env bash
|
||||
set -x
|
||||
oc create -f - <<EOF && sleep 2
|
||||
apiVersion: batch/v1
|
||||
kind: Job
|
||||
@@ -336,12 +337,12 @@ spec:
|
||||
persistentVolumeClaim:
|
||||
claimName: "pvc-conversion"
|
||||
EOF
|
||||
MYJOB=$(oc -n goghvideo-test-${RANDOMID} get jobs -l app=e2e-test -o name)
|
||||
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 goghvideo-test-${RANDOMID} 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 [[ -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
|
||||
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
|
||||
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
|
||||
if [[ "${x}" -eq 20 ]]; then exit 1; fi
|
||||
workspaces:
|
||||
- name: kubeconfig-dir
|
||||
|
||||
Reference in New Issue
Block a user