Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
OpenXG-AMF-Simple
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
CommunityXG
OpenXG-AMF-Simple
Commits
4669d48b
Commit
4669d48b
authored
Oct 09, 2020
by
Tien-Thinh Nguyen
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'develop' into session_release
parents
675068fa
451199f5
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
77 additions
and
47 deletions
+77
-47
ci-scripts/generateHtmlReport.py
ci-scripts/generateHtmlReport.py
+77
-47
No files found.
ci-scripts/generateHtmlReport.py
View file @
4669d48b
...
...
@@ -90,60 +90,90 @@ class HtmlReport():
self
.
file
.
write
(
' <br>
\n
'
)
# Build Info Summary
self
.
file
.
write
(
' <table class="table-bordered" width = "80%" align = "center" border = "1">
\n
'
)
self
.
file
.
write
(
' <tr>
\n
'
)
self
.
file
.
write
(
' <td bgcolor="lightcyan" > <span class="glyphicon glyphicon-time"></span> Build Start Time</td>
\n
'
)
buildSummary
=
''
buildSummary
+=
' <table class="table-bordered" width = "80%" align = "center" border = "1">
\n
'
buildSummary
+=
' <tr>
\n
'
buildSummary
+=
' <td bgcolor="lightcyan" > <span class="glyphicon glyphicon-time"></span> Build Start Time</td>
\n
'
#date_formatted = re.sub('\..*', '', self.created)
self
.
file
.
write
(
' <td>'
+
self
.
job_start_time
+
'</td>
\n
'
)
self
.
file
.
write
(
' </tr>
\n
'
)
self
.
file
.
write
(
' <tr>
\n
'
)
self
.
file
.
write
(
' <td bgcolor="lightcyan" > <span class="glyphicon glyphicon-wrench"></span> Build Trigger</td>
\n
'
)
buildSummary
+=
' <td>'
+
self
.
job_start_time
+
'</td>
\n
'
buildSummary
+=
' </tr>
\n
'
buildSummary
+=
' <tr>
\n
'
buildSummary
+=
' <td bgcolor="lightcyan" > <span class="glyphicon glyphicon-wrench"></span> Build Trigger</td>
\n
'
if
self
.
git_pull_request
:
self
.
file
.
write
(
' <td>Pull Request</td>
\n
'
)
buildSummary
+=
' <td>Pull Request</td>
\n
'
else
:
self
.
file
.
write
(
' <td>Push Event</td>
\n
'
)
self
.
file
.
write
(
' </tr>
\n
'
)
self
.
file
.
write
(
' <tr>
\n
'
)
self
.
file
.
write
(
' <td bgcolor="lightcyan" > <span class="glyphicon glyphicon-cloud-upload"></span> GIT Repository</td>
\n
'
)
self
.
file
.
write
(
' <td><a href="'
+
self
.
git_url
+
'">'
+
self
.
git_url
+
'</a></td>
\n
'
)
self
.
file
.
write
(
' </tr>
\n
'
)
buildSummary
+=
' <td>Push Event</td>
\n
'
buildSummary
+=
' </tr>
\n
'
buildSummary
+=
' <tr>
\n
'
buildSummary
+=
' <td bgcolor="lightcyan" > <span class="glyphicon glyphicon-cloud-upload"></span> GIT Repository</td>
\n
'
buildSummary
+=
' <td><a href="'
+
self
.
git_url
+
'">'
+
self
.
git_url
+
'</a></td>
\n
'
buildSummary
+=
' </tr>
\n
'
if
self
.
git_pull_request
:
self
.
file
.
write
(
' <td bgcolor="lightcyan" > <span class="glyphicon glyphicon-log-out"></span> Source Branch</td>
\n
'
)
self
.
file
.
write
(
' <td>'
+
self
.
git_src_branch
+
'</td>
\n
'
)
self
.
file
.
write
(
' </tr>
\n
'
)
self
.
file
.
write
(
' <tr>
\n
'
)
self
.
file
.
write
(
' <td bgcolor="lightcyan" > <span class="glyphicon glyphicon-tag"></span> Source Commit ID</td>
\n
'
)
self
.
file
.
write
(
' <td>'
+
self
.
git_src_commit
+
'</td>
\n
'
)
self
.
file
.
write
(
' </tr>
\n
'
)
buildSummary
+=
' <td bgcolor="lightcyan" > <span class="glyphicon glyphicon-log-out"></span> Source Branch</td>
\n
'
buildSummary
+=
' <td>'
+
self
.
git_src_branch
+
'</td>
\n
'
buildSummary
+=
' </tr>
\n
'
buildSummary
+=
' <tr>
\n
'
buildSummary
+=
' <td bgcolor="lightcyan" > <span class="glyphicon glyphicon-tag"></span> Source Commit ID</td>
\n
'
buildSummary
+=
' <td>'
+
self
.
git_src_commit
+
'</td>
\n
'
buildSummary
+=
' </tr>
\n
'
if
(
self
.
git_src_commit_msg
is
not
None
):
self
.
file
.
write
(
' <tr>
\n
'
)
self
.
file
.
write
(
' <td bgcolor="lightcyan" > <span class="glyphicon glyphicon-comment"></span> Source Commit Message</td>
\n
'
)
self
.
file
.
write
(
' <td>'
+
self
.
git_src_commit_msg
+
'</td>
\n
'
)
self
.
file
.
write
(
' </tr>
\n
'
)
self
.
file
.
write
(
' <tr>
\n
'
)
self
.
file
.
write
(
' <td bgcolor="lightcyan" > <span class="glyphicon glyphicon-log-in"></span> Target Branch</td>
\n
'
)
self
.
file
.
write
(
' <td>'
+
self
.
git_target_branch
+
'</td>
\n
'
)
self
.
file
.
write
(
' </tr>
\n
'
)
self
.
file
.
write
(
' <tr>
\n
'
)
self
.
file
.
write
(
' <td bgcolor="lightcyan" > <span class="glyphicon glyphicon-tag"></span> Target Commit ID</td>
\n
'
)
self
.
file
.
write
(
' <td>'
+
self
.
git_target_commit
+
'</td>
\n
'
)
self
.
file
.
write
(
' </tr>
\n
'
)
buildSummary
+=
' <tr>
\n
'
buildSummary
+=
' <td bgcolor="lightcyan" > <span class="glyphicon glyphicon-comment"></span> Source Commit Message</td>
\n
'
buildSummary
+=
' <td>'
+
self
.
git_src_commit_msg
+
'</td>
\n
'
buildSummary
+=
' </tr>
\n
'
buildSummary
+=
' <tr>
\n
'
buildSummary
+=
' <td bgcolor="lightcyan" > <span class="glyphicon glyphicon-log-in"></span> Target Branch</td>
\n
'
buildSummary
+=
' <td>'
+
self
.
git_target_branch
+
'</td>
\n
'
buildSummary
+=
' </tr>
\n
'
buildSummary
+=
' <tr>
\n
'
buildSummary
+=
' <td bgcolor="lightcyan" > <span class="glyphicon glyphicon-tag"></span> Target Commit ID</td>
\n
'
buildSummary
+=
' <td>'
+
self
.
git_target_commit
+
'</td>
\n
'
buildSummary
+=
' </tr>
\n
'
else
:
self
.
file
.
write
(
' <tr>
\n
'
)
self
.
file
.
write
(
' <td bgcolor="lightcyan" > <span class="glyphicon glyphicon-tree-deciduous"></span> Branch</td>
\n
'
)
self
.
file
.
write
(
' <td>'
+
self
.
git_src_branch
+
'</td>
\n
'
)
self
.
file
.
write
(
' </tr>
\n
'
)
self
.
file
.
write
(
' <tr>
\n
'
)
self
.
file
.
write
(
' <td bgcolor="lightcyan" > <span class="glyphicon glyphicon-tag"></span> Commit ID</td>
\n
'
)
self
.
file
.
write
(
' <td>'
+
self
.
git_src_commit
+
'</td>
\n
'
)
self
.
file
.
write
(
' </tr>
\n
'
)
buildSummary
+=
' <tr>
\n
'
buildSummary
+=
' <td bgcolor="lightcyan" > <span class="glyphicon glyphicon-tree-deciduous"></span> Branch</td>
\n
'
buildSummary
+=
' <td>'
+
self
.
git_src_branch
+
'</td>
\n
'
buildSummary
+=
' </tr>
\n
'
buildSummary
+=
' <tr>
\n
'
buildSummary
+=
' <td bgcolor="lightcyan" > <span class="glyphicon glyphicon-tag"></span> Commit ID</td>
\n
'
buildSummary
+=
' <td>'
+
self
.
git_src_commit
+
'</td>
\n
'
buildSummary
+=
' </tr>
\n
'
if
(
self
.
git_src_commit_msg
is
not
None
):
self
.
file
.
write
(
' <tr>
\n
'
)
self
.
file
.
write
(
' <td bgcolor="lightcyan" > <span class="glyphicon glyphicon-comment"></span> Commit Message</td>
\n
'
)
self
.
file
.
write
(
' <td>'
+
self
.
git_src_commit_msg
+
'</td>
\n
'
)
self
.
file
.
write
(
' </tr>
\n
'
)
self
.
file
.
write
(
' </table>
\n
'
)
self
.
file
.
write
(
' <br>
\n
'
)
buildSummary
+=
' <tr>
\n
'
buildSummary
+=
' <td bgcolor="lightcyan" > <span class="glyphicon glyphicon-comment"></span> Commit Message</td>
\n
'
buildSummary
+=
' <td>'
+
self
.
git_src_commit_msg
+
'</td>
\n
'
buildSummary
+=
' </tr>
\n
'
buildSummary
+=
' </table>
\n
'
buildSummary
+=
' <br>
\n
'
self
.
file
.
write
(
buildSummary
)
cwd
=
os
.
getcwd
()
if
os
.
path
.
isfile
(
cwd
+
'/ds_tester_results_oai_cn5g.html'
):
newEpcReport
=
open
(
cwd
+
'/ds_tester_results_oai_cn5g_new.html'
,
'w'
)
buildSummaryDone
=
True
with
open
(
cwd
+
'/ds_tester_results_oai_cn5g.html'
,
'r'
)
as
originalEpcReport
:
for
line
in
originalEpcReport
:
result
=
re
.
search
(
'DS Tester Summary'
,
line
)
if
(
result
is
not
None
)
and
buildSummaryDone
:
newEpcReport
.
write
(
buildSummary
)
buildSummaryDone
=
False
newEpcReport
.
write
(
line
)
originalEpcReport
.
close
()
newEpcReport
.
close
()
os
.
rename
(
cwd
+
'/ds_tester_results_oai_cn5g_new.html'
,
cwd
+
'/ds_tester_results_oai_cn5g.html'
)
if
os
.
path
.
isfile
(
cwd
+
'/deploy_results_oai_cn5g.html'
):
newEpcReport
=
open
(
cwd
+
'/deploy_results_oai_cn5g_new.html'
,
'w'
)
buildSummaryDone
=
True
with
open
(
cwd
+
'/deploy_results_oai_cn5g.html'
,
'r'
)
as
originalEpcReport
:
for
line
in
originalEpcReport
:
result
=
re
.
search
(
'Deployment Summary'
,
line
)
if
(
result
is
not
None
)
and
buildSummaryDone
:
newEpcReport
.
write
(
buildSummary
)
buildSummaryDone
=
False
newEpcReport
.
write
(
line
)
originalEpcReport
.
close
()
newEpcReport
.
close
()
os
.
rename
(
cwd
+
'/deploy_results_oai_cn5g_new.html'
,
cwd
+
'/deploy_results_oai_cn5g.html'
)
def
generateFooter
(
self
):
self
.
file
.
write
(
' <div class="well well-lg">End of Build Report -- Copyright <span class="glyphicon glyphicon-copyright-mark"></span> 2020 <a href="http://www.openairinterface.org/">OpenAirInterface</a>. All Rights Reserved.</div>
\n
'
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment