ci: OCP4 deletes pods from batch jobs automatically

On the new OCP4 cluster, deleting the batch job results in deletion of
the pod as well. Deleting the pod when it does not exist anymore results
in a failure. Ignoring the potential failure makes the job pass again.

Signed-off-by: Niels de Vos <ndevos@redhat.com>
This commit is contained in:
Niels de Vos 2020-07-24 15:43:48 +02:00 committed by mergify[bot]
parent db0313a26b
commit 9db5d82327

View File

@ -63,7 +63,8 @@ oc logs "${jjb_pod}"
# delete the job, so a next run can create it again
oc process -f "jjb-${CMD}.yaml" -p=SESSION="${SESSION}" | oc delete --wait -f -
oc delete pod "${jjb_pod}"
# depending on the OpenShift version, the pod gets deleted automatically
oc delete --ignore-not-found pod "${jjb_pod}"
# return the exit status of the pod
[ "${status}" = 'Succeeded' ]