Commit 8de0f500 authored by Robert Schmidt's avatar Robert Schmidt

Merge remote-tracking branch 'origin/ci-fix-warning-recovery' into integration_2023_w40

parents fe3aa3dd ed4c6341
......@@ -433,7 +433,7 @@ class Containerize():
if ret.returncode != 0:
logging.error('\u001B[1m Could not build properly ran-base\u001B[0m')
# Recover the name of the failed container?
cmd.run(f"{self.cli} ps --quiet --filter \"status=exited\" -n1 | xargs {self.cli} rm -f")
cmd.run(f"{self.cli} ps --quiet --filter \"status=exited\" -n1 | xargs --no-run-if-empty {self.cli} rm -f")
cmd.run(f"{self.cli} image prune --force")
cmd.close()
logging.error('\u001B[1m Building OAI Images Failed\u001B[0m')
......@@ -466,8 +466,8 @@ class Containerize():
cmd.run(f'sed -i -e "s#{baseImage}:latest#{baseImage}:{baseTag}#" docker/Dockerfile.{pattern}{self.dockerfileprefix}')
if image != 'ran-build':
cmd.run(f'sed -i -e "s#ran-build:latest#ran-build:{imageTag}#" docker/Dockerfile.{pattern}{self.dockerfileprefix}')
cmd.run(f'{self.cli} build {self.cliBuildOptions} --target {image} --tag {image}:{imageTag} --file docker/Dockerfile.{pattern}{self.dockerfileprefix} . > cmake_targets/log/{image}.log 2>&1', timeout=1200)
if image == 'ran-build':
ret = cmd.run(f'{self.cli} build {self.cliBuildOptions} --target {image} --tag {image}:{imageTag} --file docker/Dockerfile.{pattern}{self.dockerfileprefix} . > cmake_targets/log/{image}.log 2>&1', timeout=1200)
if image == 'ran-build' and ret.returncode == 0:
cmd.run(f"docker run --name test-log -d {image}:{imageTag} /bin/true")
cmd.run(f"docker cp test-log:/oai-ran/cmake_targets/log/ cmake_targets/log/{image}/")
cmd.run(f"docker rm -f test-log")
......@@ -479,7 +479,7 @@ class Containerize():
logging.error('\u001B[1m Could not build properly ' + image + '\u001B[0m')
status = False
# Here we should check if the last container corresponds to a failed command and destroy it
cmd.run(f"{self.cli} ps --quiet --filter \"status=exited\" -n1 | xargs {self.cli} rm -f")
cmd.run(f"{self.cli} ps --quiet --filter \"status=exited\" -n1 | xargs --no-run-if-empty {self.cli} rm -f")
allImagesSize[image] = 'N/A -- Build Failed'
break
else:
......
......@@ -233,6 +233,8 @@ compilations() {
$CMAKE --build . $verbose --target $targets -- -j$(nproc)
ret=$?
} > $dlog/$logfile 2>&1
# Print the errors and warnings for CI purposes
egrep -A3 "warning:|error:" $dlog/$logfile || true
check_warnings "$dlog/$logfile"
if [[ $ret -eq 0 ]]; then
echo_success "$targets compiled"
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment