diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 95b4843624c30fabdd6fffe13e15fe5a9efd024e..3a673ef34c7eb5d6415008b70bda5fc63f44c57b 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -34,7 +34,7 @@ deploy-build-environment: # start the deploy job - oc create -f simplejob.yml # wait for job to finish https://stackoverflow.com/questions/5073453wait-for-kubernetes-job-to-complete-on-either-failure-success-using-command-line - #- oc get job/simplejob${CI_PIPELINE_ID} -o=jsonpath='{.status}' -w && oc get job/simplejob -o=jsonpath='{.status.conditions[*].type}' | grep -i -E 'failed|complete' || echo 'Failed' + - oc get job/simplejob${CI_PIPELINE_ID} -o=jsonpath='{.status}' -w && oc get job/simplejob -o=jsonpath='{.status.conditions[*].type}' | grep -i -E 'failed|complete' || echo 'Failed' - while true; do x=$(oc get pods |grep simplejob${CI_PIPELINE_ID}|awk '{ print $3}');if [ $x != "Running" ]; then break; fi;done # when build job finishes get the logs - oc logs jobs/simplejob${CI_PIPELINE_ID} | tee log.txt