ci: remove jjb Pods after job finished

Currently the number of Pods is growing in the OpenShift Console. The
pods are all Completed, so not running anymore, but there is also no
need to keep them around.

Signed-off-by: Niels de Vos <ndevos@redhat.com>
This commit is contained in:
Niels de Vos 2020-06-10 14:36:12 +02:00 committed by mergify[bot]
parent a089d8eaa1
commit 477a1225c9

View File

@ -63,6 +63,7 @@ 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}"
# return the exit status of the pod
[ "${status}" = 'Succeeded' ]