From ca72af724e1a8d3eb0ab2021162c92575ab6c1c7 Mon Sep 17 00:00:00 2001 From: Robert Schmidt Date: Mon, 10 Oct 2022 13:30:52 +0200 Subject: [PATCH] Build eNB/gNB and UE on cluster in stages --- ci-scripts/cls_cluster.py | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/ci-scripts/cls_cluster.py b/ci-scripts/cls_cluster.py index bcaa1d2622..c30ba68bb0 100644 --- a/ci-scripts/cls_cluster.py +++ b/ci-scripts/cls_cluster.py @@ -314,6 +314,14 @@ class Cluster: gnb_aw2s_job = self._start_build(mySSH, 'oai-gnb-aw2s') attemptedImages += ['oai-gnb-aw2s'] + wait = enb_job is not None and gnb_job is not None and gnb_aw2s_job is not None and self._wait_build_end(mySSH, [enb_job, gnb_job, gnb_aw2s_job], 600) + if not wait: logging.error('error during build of eNB/gNB') + status = status and wait + # recover logs + mySSH.command(f'oc logs {enb_job} > cmake_targets/log/oai-enb.log', '\$', 10) + mySSH.command(f'oc logs {gnb_job} > cmake_targets/log/oai-gnb.log', '\$', 10) + mySSH.command(f'oc logs {gnb_aw2s_job} > cmake_targets/log/oai-gnb-aw2s.log', '\$', 10) + self._recreate_is_tag(mySSH, 'oai-lte-ue', imageTag, 'openshift/oai-lte-ue-is.yaml') self._recreate_bc(mySSH, 'oai-lte-ue', imageTag, 'openshift/oai-lte-ue-bc.yaml') self._retag_image_statement(mySSH, 'ran-base', 'image-registry.openshift-image-registry.svc:5000/oaicicd-ran/ran-base', baseTag, 'docker/Dockerfile.lteUE.rhel8.2') @@ -328,13 +336,10 @@ class Cluster: nrue_job = self._start_build(mySSH, 'oai-nr-ue') attemptedImages += ['oai-nr-ue'] - wait = enb_job is not None and gnb_job is not None and gnb_aw2s_job is not None and lteue_job is not None and nrue_job is not None and self._wait_build_end(mySSH, [enb_job, gnb_job, lteue_job, nrue_job], 600) - if not wait: logging.error('error during build of eNB/gNB/lteUE/nrUE') + wait = lteue_job is not None and nrue_job is not None and self._wait_build_end(mySSH, [lteue_job, nrue_job], 600) + if not wait: logging.error('error during build of lteUE/nrUE') status = status and wait # recover logs - mySSH.command(f'oc logs {enb_job} > cmake_targets/log/oai-enb.log', '\$', 10) - mySSH.command(f'oc logs {gnb_job} > cmake_targets/log/oai-gnb.log', '\$', 10) - mySSH.command(f'oc logs {gnb_aw2s_job} > cmake_targets/log/oai-gnb-aw2s.log', '\$', 10) mySSH.command(f'oc logs {lteue_job} > cmake_targets/log/oai-lte-ue.log', '\$', 10) mySSH.command(f'oc logs {nrue_job} > cmake_targets/log/oai-nr-ue.log', '\$', 10)