Commit 444da0b9 authored by Raphael Defosseux's avatar Raphael Defosseux

Merge branch 'ci-fix-html-report' into 'develop'

fix(ci): fixing HTML reporting on the case of build from scratch

See merge request oai/cn5g/oai-cn5g-upf-vpp!21
parents d44d777b b0fd4700
......@@ -49,7 +49,7 @@ class HtmlReport():
self.buildSummaryHeader()
self.initialGitSetup()
self.cloningAnPatching()
self.cloningAndPatching()
self.installLibsPackagesRow()
self.buildCompileRows()
self.copyToTargetImage()
......@@ -253,7 +253,7 @@ class HtmlReport():
self.file.write(cell_msg)
def cloningAnPatching(self):
def cloningAndPatching(self):
self.file.write(' <tr>\n')
self.file.write(' <td bgcolor="lightcyan" >Cloning and Patching VPP</td>\n')
self.analyze_docker_clone_patch('UPF-VPP')
......@@ -273,8 +273,11 @@ class HtmlReport():
logFileName = 'upf_' + variant + '_image_build.log'
if os.path.isfile(cwd + '/archives/' + logFileName):
status = False
section_start_pattern = 'git clone -b stable/2101 https://github.com/fdio/vpp.git'
section_end_pattern = 'RUN make install-dep build-release -C vpp'
section_start_pattern = 'RUN git clone -b stable/2101 https://github.com/fdio/vpp.git'
if self.git_pull_request:
section_end_pattern = 'RUN make build-release -C vpp'
else:
section_end_pattern = 'RUN make install-dep -C vpp'
section_status = False
with open(cwd + '/archives/' + logFileName, 'r') as logfile:
for line in logfile:
......@@ -322,7 +325,10 @@ class HtmlReport():
logFileName = 'upf_' + variant + '_image_build.log'
if os.path.isfile(cwd + '/archives/' + logFileName):
status = False
section_start_pattern = 'RUN make install-dep build-release -C vpp'
if self.git_pull_request:
section_start_pattern = 'RUN make build-release -C vpp'
else:
section_start_pattern = 'RUN make install-dep -C vpp'
if variant == 'docker':
section_end_pattern = 'FROM ubuntu:bionic as oai-upf-vpp'
else:
......@@ -355,11 +361,13 @@ class HtmlReport():
else:
cell_msg = ' <td bgcolor="Tomato"><pre style="border:none; background-color:Tomato"><b>'
cell_msg += 'KO:\n'
if not self.git_pull_request:
cell_msg += ' -- make install-dep -C vpp\n'
if package_install:
cell_msg += ' ** Packages Installation: OK\n'
else:
cell_msg += ' ** Packages Installation: KO\n'
cell_msg += ' -- make install-dep build-release -C vpp\n'
if package_install:
cell_msg += ' ** Packages Installation: OK\n'
else:
cell_msg += ' ** Packages Installation: KO\n'
if dpdk_build_status:
cell_msg += ' ** dpdk Installation: OK\n'
else:
......@@ -632,7 +640,7 @@ class HtmlReport():
result = re.search('oai-upf-vpp *ci-tmp ', line)
else:
result = re.search('oai-upf-vpp *develop ', line)
if result is not None:
if result is not None and not status:
if variant == 'docker':
result = re.search('ago *([0-9A-Z\.]+)', line)
else:
......
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