From 9db5d82327dc6661bdeb8fc850fb57aa3f65e73d Mon Sep 17 00:00:00 2001 From: Niels de Vos Date: Fri, 24 Jul 2020 15:43:48 +0200 Subject: [PATCH] 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 --- deploy/jjb.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/deploy/jjb.sh b/deploy/jjb.sh index 2314a7f3d..5ebd3d89a 100755 --- a/deploy/jjb.sh +++ b/deploy/jjb.sh @@ -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' ]