diff --git a/ci-scripts/cls_cluster.py b/ci-scripts/cls_cluster.py index 185e90a13e..5cbae237c3 100644 --- a/ci-scripts/cls_cluster.py +++ b/ci-scripts/cls_cluster.py @@ -165,24 +165,6 @@ class Cluster: return -1 return int(result.group("size")) - def _deploy_pod(self, filename, timeout = 120): - ret = self.cmd.run(f'oc create -f {filename}') - result = re.search(r'pod/(?P[a-zA-Z0-9_\-]+) created', ret.stdout) - if result is None: - logging.error(f'could not deploy pod: {ret.stdout}') - return None - pod = result.group("pod") - logging.debug(f'checking if pod {pod} is in Running state') - ret = self.cmd.run(f'oc wait --for=condition=ready pod {pod} --timeout={timeout}s', silent=True) - if ret.returncode == 0: - return pod - logging.error(f'pod {pod} did not reach Running state') - self._undeploy_pod(filename) - return None - - def _undeploy_pod(self, filename): - self.cmd.run(f'oc delete -f {filename}') - def PullClusterImage(self, HTML, node, images, tag_prefix): logging.debug(f'Pull OC image {images} to server {node}') self.testCase_id = HTML.testCase_id @@ -296,20 +278,6 @@ class Cluster: if not status: logging.error('failure during build of ran-base') log_files.append(self._retrieveOCLog(ctx, ranbase_job, lSourcePath, 'ran-base')) - # recover logs by mounting image - self._retag_image_statement('ran-base', 'ran-base', baseTag, 'openshift/ran-base-log-retrieval.yaml') - pod = self._deploy_pod('openshift/ran-base-log-retrieval.yaml') - if pod is not None: - logdir = f'{lSourcePath}/cmake_targets/log/ran-base' - self.cmd.run(f'mkdir -p {logdir}') - self.cmd.run(f'oc rsync {pod}:/oai-ran/cmake_targets/log/ {logdir}') - self._undeploy_pod('openshift/ran-base-log-retrieval.yaml') - ret = self.cmd.run(f'ls {logdir}') - for f in ret.stdout.splitlines(): - archiveArtifact(self.cmd, ctx, f"{logdir}/{f}") - else: - status = False - if status: self._recreate_is_tag('oai-physim', imageTag, 'openshift/oai-physim-is.yaml') self._recreate_bc('oai-physim', imageTag, 'openshift/oai-physim-bc.yaml') diff --git a/ci-scripts/cls_containerize.py b/ci-scripts/cls_containerize.py index 34522d9eef..adc270cabb 100644 --- a/ci-scripts/cls_containerize.py +++ b/ci-scripts/cls_containerize.py @@ -386,13 +386,6 @@ class Containerize(): t = ("ran-base", archiveArtifact(cmd, ctx, logfile)) log_files.append(t) - # Recover build logs, for the moment only possible when build is successful - cmd.run(f"{self.cli} create --name test {baseImage}:{baseTag}") - cmd.run("mkdir -p cmake_targets/log/ran-base") - logfile = f'{lSourcePath}/cmake_targets/log/ran-base.log' - cmd.run(f"{self.cli} cp test:/oai-ran/cmake_targets/log/all.txt {logfile}") - cmd.run(f"{self.cli} rm -f test") - archiveArtifact(cmd, ctx, logfile) # First verify if the base image was properly created. ret = cmd.run(f"{self.cli} image inspect --format=\'Size = {{{{.Size}}}} bytes\' {baseImage}:{baseTag}") allImagesSize = {} @@ -438,12 +431,6 @@ class Containerize(): log_files.append(t) if image == 'oai-gnb-aerial': cmd.run('rm -f nvipc.src.2025.05.20.tar.gz') - if image == 'ran-build' or image == 'ran-build-asan' or image == 'ran-build-fhi72': - cmd.run(f"docker run --name test-log -d {name}:{imageTag} /bin/true") - logfile = f'{lSourcePath}/{image}.ninja.log' - cmd.run(f"docker cp test-log:/oai-ran/cmake_targets/log/all.txt {logfile}") - cmd.run(f"docker rm -f test-log") - archiveArtifact(cmd, ctx, logfile) # check the status of the build ret = cmd.run(f"{self.cli} image inspect --format=\'Size = {{{{.Size}}}} bytes\' {name}:{imageTag}") if ret.returncode != 0: