Commit 2e40abe1 authored by Raphael Defosseux's avatar Raphael Defosseux

fix(ci): reporting was incorrect

Signed-off-by: default avatarRaphael Defosseux <raphael.defosseux@openairinterface.org>
parent cd002625
...@@ -618,7 +618,7 @@ class HtmlReport(): ...@@ -618,7 +618,7 @@ class HtmlReport():
status = False status = False
if nfType == 'NRF': if nfType == 'NRF':
section_start_pattern = 'build_nrf --clean --Verbose --build-type Release --jobs' section_start_pattern = 'build_nrf --clean --Verbose --build-type Release --jobs'
section_end_pattern = 'FROM ubuntu:bionic as oai-nrf$' section_end_pattern = 'FROM .* as oai-nrf$'
pass_pattern = 'nrf installed' pass_pattern = 'nrf installed'
section_status = False section_status = False
with open(cwd + '/archives/' + logFileName, 'r') as logfile: with open(cwd + '/archives/' + logFileName, 'r') as logfile:
...@@ -666,7 +666,7 @@ class HtmlReport(): ...@@ -666,7 +666,7 @@ class HtmlReport():
if os.path.isfile(cwd + '/archives/' + logFileName): if os.path.isfile(cwd + '/archives/' + logFileName):
if nfType == 'NRF': if nfType == 'NRF':
section_start_pattern = 'build_nrf --clean --Verbose --build-type Release --jobs' section_start_pattern = 'build_nrf --clean --Verbose --build-type Release --jobs'
section_end_pattern = 'FROM ubuntu:bionic as oai-nrf$' section_end_pattern = 'FROM .* as oai-nrf$'
section_status = False section_status = False
with open(cwd + '/archives/' + logFileName, 'r') as logfile: with open(cwd + '/archives/' + logFileName, 'r') as logfile:
for line in logfile: for line in logfile:
...@@ -727,23 +727,31 @@ class HtmlReport(): ...@@ -727,23 +727,31 @@ class HtmlReport():
for variant in variants: for variant in variants:
logFileName = 'nrf_' + variant + '_image_build.log' logFileName = 'nrf_' + variant + '_image_build.log'
if os.path.isfile(cwd + '/archives/' + logFileName): if os.path.isfile(cwd + '/archives/' + logFileName):
section_start_pattern = 'FROM ubuntu:bionic as oai-nrf$' section_start_pattern = 'FROM .* as oai-nrf$'
section_end_pattern = 'COPY --from=oai-nrf-builder /openair-nrf/scripts/entrypoint.sh entrypoint.sh' section_end_pattern = 'COPY --from=oai-nrf-builder /openair-nrf/etc/nrf.conf '
section_status = False section_status = False
status = False status = False
noPbInLDD = True
with open(cwd + '/archives/' + logFileName, 'r') as logfile: with open(cwd + '/archives/' + logFileName, 'r') as logfile:
for line in logfile: for line in logfile:
result = re.search(section_start_pattern, line) result = re.search(section_start_pattern, line)
if result is not None: if result is not None:
section_status = True section_status = True
result = re.search('not found', line)
if section_status and result is not None:
noPbInLDD = False
result = re.search(section_end_pattern, line) result = re.search(section_end_pattern, line)
if result is not None: if result is not None:
section_status = False section_status = False
status = True status = True
logfile.close() logfile.close()
if status: if status and noPbInLDD:
cell_msg = ' <td bgcolor="LimeGreen"><pre style="border:none; background-color:LimeGreen"><b>' cell_msg = ' <td bgcolor="LimeGreen"><pre style="border:none; background-color:LimeGreen"><b>'
cell_msg += 'OK:\n' cell_msg += 'OK:\n'
elif noPbInLDD:
cell_msg = ' <td bgcolor="Tomato"><pre style="border:none; background-color:Tomato"><b>'
cell_msg += 'KO:\n'
cell_msg += ' Some libraries were not copied from builder image\n'
else: else:
cell_msg = ' <td bgcolor="Tomato"><pre style="border:none; background-color:Tomato"><b>' cell_msg = ' <td bgcolor="Tomato"><pre style="border:none; background-color:Tomato"><b>'
cell_msg += 'KO:\n' cell_msg += 'KO:\n'
...@@ -841,7 +849,7 @@ class HtmlReport(): ...@@ -841,7 +849,7 @@ class HtmlReport():
result = re.search(section_end_pattern, line) result = re.search(section_end_pattern, line)
if result is not None: if result is not None:
section_status = False section_status = False
if section_status: if section_status and not status:
if nfType == 'NRF': if nfType == 'NRF':
if self.git_pull_request: if self.git_pull_request:
result = re.search('oai-nrf *ci-tmp', line) result = re.search('oai-nrf *ci-tmp', line)
......
...@@ -107,7 +107,8 @@ COPY --from=oai-nrf-builder \ ...@@ -107,7 +107,8 @@ COPY --from=oai-nrf-builder \
/usr/lib64/libboost_regex.so.1.66.0 \ /usr/lib64/libboost_regex.so.1.66.0 \
/usr/lib64/ /usr/lib64/
RUN ldconfig RUN ldconfig && \
ldd /openair-nrf/bin/oai_nrf
# Copying template configuration files # Copying template configuration files
# The configuration folder will be flat # The configuration folder will be flat
......
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