From bfd3a1264cbadcbf9a3ce388b58c03788b5f0d63 Mon Sep 17 00:00:00 2001 From: Raphael Defosseux Date: Mon, 20 Dec 2021 10:32:13 +0100 Subject: [PATCH 1/3] fix(ci): remove intermediate build images Signed-off-by: Raphael Defosseux --- ci-scripts/cls_containerize.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/ci-scripts/cls_containerize.py b/ci-scripts/cls_containerize.py index c83713ea1e..d83facb5db 100644 --- a/ci-scripts/cls_containerize.py +++ b/ci-scripts/cls_containerize.py @@ -338,6 +338,12 @@ class Containerize(): mySSH.command('zip -r -qq build_log_' + self.testCase_id + '.zip build_log_' + self.testCase_id, '\$', 5) mySSH.copyin(lIpAddr, lUserName, lPassWord, lSourcePath + '/cmake_targets/build_log_' + self.testCase_id + '.zip', '.') mySSH.command('rm -f build_log_' + self.testCase_id + '.zip','\$', 5) + # Remove all intermediate build images + if self.ranAllowMerge and forceBaseImageBuild: + mySSH.command(self.cli + ' image rm ' + baseImage + ':' + baseTag + ' || true', '\$', 30) + for image,pattern in imageNames: + mySSH.command(self.cli + ' image rm ' + image + ':' + imageTag + ' || true', '\$', 30) + mySSH.command('docker rmi ran-build:' + imageTag,'\$', 5) mySSH.close() ZipFile('build_log_' + self.testCase_id + '.zip').extractall('.') From da0b480092859f1db2a68f5552b9627b5149662e Mon Sep 17 00:00:00 2001 From: Raphael Defosseux Date: Mon, 20 Dec 2021 10:36:32 +0100 Subject: [PATCH 2/3] fix(docker): adding missing libs to run uhd_find_devices in RHEL8 containers Signed-off-by: Raphael Defosseux --- docker/Dockerfile.eNB.rhel8.2 | 4 ++++ docker/Dockerfile.gNB.rhel8.2 | 3 +++ docker/Dockerfile.lteUE.rhel8.2 | 3 +++ docker/Dockerfile.nrUE.rhel8.2 | 3 +++ 4 files changed, 13 insertions(+) diff --git a/docker/Dockerfile.eNB.rhel8.2 b/docker/Dockerfile.eNB.rhel8.2 index 23b0f38c18..bb0a9cb064 100644 --- a/docker/Dockerfile.eNB.rhel8.2 +++ b/docker/Dockerfile.eNB.rhel8.2 @@ -87,8 +87,12 @@ COPY --from=enb-base \ /lib64/libboost_atomic.so.1.66.0 \ /lib64/libboost_timer.so.1.66.0 \ /lib64/libboost_regex.so.1.66.0 \ + /lib64/libicudata.so.60 \ + /lib64/libicui18n.so.60 \ + /lib64/libicuuc.so.60 \ /lib64/ + # Now we are copying from builder-image the UHD files. COPY --from=enb-base /usr/local/bin/uhd_find_devices /usr/local/bin COPY --from=enb-base /usr/local/lib/libprotobuf-c.so.1 /usr/local/lib diff --git a/docker/Dockerfile.gNB.rhel8.2 b/docker/Dockerfile.gNB.rhel8.2 index c53b3e75e2..832fa17153 100644 --- a/docker/Dockerfile.gNB.rhel8.2 +++ b/docker/Dockerfile.gNB.rhel8.2 @@ -93,6 +93,9 @@ COPY --from=gnb-base \ /lib64/libboost_atomic.so.1.66.0 \ /lib64/libboost_timer.so.1.66.0 \ /lib64/libboost_regex.so.1.66.0 \ + /lib64/libicudata.so.60 \ + /lib64/libicui18n.so.60 \ + /lib64/libicuuc.so.60 \ /lib64/ # Now we are copying from builder-image the UHD files. diff --git a/docker/Dockerfile.lteUE.rhel8.2 b/docker/Dockerfile.lteUE.rhel8.2 index a836e114a8..2580b95278 100644 --- a/docker/Dockerfile.lteUE.rhel8.2 +++ b/docker/Dockerfile.lteUE.rhel8.2 @@ -91,6 +91,9 @@ COPY --from=lte-ue-base \ /lib64/libboost_atomic.so.1.66.0 \ /lib64/libboost_timer.so.1.66.0 \ /lib64/libboost_regex.so.1.66.0 \ + /lib64/libicudata.so.60 \ + /lib64/libicui18n.so.60 \ + /lib64/libicuuc.so.60 \ /lib64/ # Now we are copying from builder-image the UHD files. diff --git a/docker/Dockerfile.nrUE.rhel8.2 b/docker/Dockerfile.nrUE.rhel8.2 index 819a61e94c..f774638f47 100644 --- a/docker/Dockerfile.nrUE.rhel8.2 +++ b/docker/Dockerfile.nrUE.rhel8.2 @@ -95,6 +95,9 @@ COPY --from=nr-ue-base \ /lib64/libboost_atomic.so.1.66.0 \ /lib64/libboost_timer.so.1.66.0 \ /lib64/libboost_regex.so.1.66.0 \ + /lib64/libicudata.so.60 \ + /lib64/libicui18n.so.60 \ + /lib64/libicuuc.so.60 \ /lib64/ # Now we are copying from builder-image the UHD files. From 3ea34db9a782b324321027a36ce129dba2ac9dda Mon Sep 17 00:00:00 2001 From: Raphael Defosseux Date: Mon, 20 Dec 2021 11:53:44 +0100 Subject: [PATCH 3/3] fix(ci): build on the correct image tag Signed-off-by: Raphael Defosseux --- ci-scripts/cls_containerize.py | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/ci-scripts/cls_containerize.py b/ci-scripts/cls_containerize.py index d83facb5db..41747f1bc2 100644 --- a/ci-scripts/cls_containerize.py +++ b/ci-scripts/cls_containerize.py @@ -209,8 +209,7 @@ class Containerize(): # if asterix, copy the entitlement and subscription manager configurations if self.host == 'Red Hat': - mySSH.command('mkdir -p tmp/ca/', '\$', 5) - mySSH.command('mkdir -p tmp/entitlement/', '\$', 5) + mySSH.command('mkdir -p tmp/ca/ tmp/entitlement/', '\$', 5) mySSH.command('sudo cp /etc/rhsm/ca/redhat-uep.pem tmp/ca/', '\$', 5) mySSH.command('sudo cp /etc/pki/entitlement/*.pem tmp/entitlement/', '\$', 5) @@ -288,7 +287,7 @@ class Containerize(): # we need to update them with proper tag mySSH.command('sed -i -e "s#' + baseImage + ':latest#' + baseImage + ':' + baseTag + '#" docker/Dockerfile.' + pattern + self.dockerfileprefix, '\$', 5) if image != 'ran-build': - mySSH.command('sed -i -e "s#' + "ran-build" + ':latest#' + "ran-build" + ':' + baseTag + '#" docker/Dockerfile.' + pattern + self.dockerfileprefix, '\$', 5) + mySSH.command('sed -i -e "s#' + "ran-build" + ':latest#' + "ran-build" + ':' + imageTag + '#" docker/Dockerfile.' + pattern + self.dockerfileprefix, '\$', 5) mySSH.command(self.cli + ' build ' + self.cliBuildOptions + ' --target ' + image + ' --tag ' + image + ':' + imageTag + ' --file docker/Dockerfile.' + pattern + self.dockerfileprefix + ' . > cmake_targets/log/' + image + '.log 2>&1', '\$', 1200) # split the log mySSH.command('mkdir -p cmake_targets/log/' + image, '\$', 5) @@ -341,9 +340,7 @@ class Containerize(): # Remove all intermediate build images if self.ranAllowMerge and forceBaseImageBuild: mySSH.command(self.cli + ' image rm ' + baseImage + ':' + baseTag + ' || true', '\$', 30) - for image,pattern in imageNames: - mySSH.command(self.cli + ' image rm ' + image + ':' + imageTag + ' || true', '\$', 30) - mySSH.command('docker rmi ran-build:' + imageTag,'\$', 5) + mySSH.command(self.cli + ' image rm ran-build:' + imageTag + ' || true','\$', 5) mySSH.close() ZipFile('build_log_' + self.testCase_id + '.zip').extractall('.')