Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
oai
cn5g
oai-cn5g-nrf
Commits
0da9c27b
Commit
0da9c27b
authored
Mar 24, 2021
by
Mohammed Ismail
Browse files
[CI] added rhel build
Signed-off-by:
Mohammed Ismail
<
mohammed.ismail@openairinterface.org
>
parent
da6976f8
Changes
4
Expand all
Show whitespace changes
Inline
Side-by-side
build/scripts/build_helper
View file @
0da9c27b
...
...
@@ -39,7 +39,7 @@ case "$OS_DISTRO" in
ubuntu) OS_BASEDISTRO="debian"; INSTALLER="apt-get"; CMAKE="cmake" ;;
esac
IS_CONTAINER=`egrep -c "docker|kubepods|podman" /proc/self/cgroup`
IS_CONTAINER=`egrep -c "docker|kubepods|podman
|buildah|libpod
" /proc/self/cgroup
|| true
`
if [ $IS_CONTAINER -eq 0 ]
then
...
...
build/scripts/build_helper.nrf
View file @
0da9c27b
...
...
@@ -240,6 +240,8 @@ install_nghttp2_from_git() {
binutils-devel \
autoconf \
automake \
$CMAKE \
make \
libtool \
pkg-config \
zlib-devel \
...
...
ci-scripts/Jenkinsfile-GitLab-Docker
View file @
0da9c27b
This diff is collapsed.
Click to expand it.
ci-scripts/generateHtmlReport.py
View file @
0da9c27b
...
...
@@ -20,6 +20,7 @@
# */
#---------------------------------------------------------------------
import
glob
import
os
import
re
import
sys
...
...
@@ -109,6 +110,15 @@ class HtmlReport():
buildSummary
+=
' <td><a href="'
+
self
.
git_url
+
'">'
+
self
.
git_url
+
'</a></td>
\n
'
buildSummary
+=
' </tr>
\n
'
if
self
.
git_pull_request
:
buildSummary
+=
' <tr>
\n
'
buildSummary
+=
' <td bgcolor="lightcyan" > <span class="glyphicon glyphicon-log-out"></span> Source Branch</td>
\n
'
buildSummary
+=
' <td><a href="TEMPLATE_MERGE_REQUEST_LINK">TEMPLATE_MERGE_REQUEST_LINK</a></td>
\n
'
buildSummary
+=
' </tr>
\n
'
buildSummary
+=
' <tr>
\n
'
buildSummary
+=
' <td bgcolor="lightcyan" > <span class="glyphicon glyphicon-header"></span> Merge Request Title</td>
\n
'
buildSummary
+=
' <td>TEMPLATE_MERGE_REQUEST_TEMPLATE</td>
\n
'
buildSummary
+=
' </tr>
\n
'
buildSummary
+=
' <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
'
...
...
@@ -148,23 +158,10 @@ class HtmlReport():
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'
)
for
reportFile
in
glob
.
glob
(
'./*results_oai_cn5g.html'
):
newEpcReport
=
open
(
cwd
+
'/'
+
str
(
reportFile
)
+
'.new'
,
'w'
)
buildSummaryDone
=
True
with
open
(
cwd
+
'/
deploy_results_oai_cn5g.html'
,
'r'
)
as
originalEpcReport
:
with
open
(
cwd
+
'/
'
+
str
(
reportFile
)
,
'r'
)
as
originalEpcReport
:
for
line
in
originalEpcReport
:
result
=
re
.
search
(
'Deployment Summary'
,
line
)
if
(
result
is
not
None
)
and
buildSummaryDone
:
...
...
@@ -173,7 +170,7 @@ class HtmlReport():
newEpcReport
.
write
(
line
)
originalEpcReport
.
close
()
newEpcReport
.
close
()
os
.
rename
(
cwd
+
'/
deploy_results_oai_cn5g_new.html'
,
cwd
+
'/deploy_results_oai_cn5g.html'
)
os
.
rename
(
cwd
+
'/
'
+
str
(
reportFile
)
+
'.new'
,
cwd
+
'/'
+
str
(
reportFile
)
)
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
'
)
...
...
@@ -366,12 +363,13 @@ class HtmlReport():
self
.
file
.
write
(
' </div>
\n
'
)
def
buildSummaryHeader
(
self
):
self
.
file
.
write
(
' <h2>Docker Image Build Summary</h2>
\n
'
)
self
.
file
.
write
(
' <h2>Docker
/ Podman
Image Build Summary</h2>
\n
'
)
self
.
file
.
write
(
' <table class="table-bordered" width = "100%" align = "center" border = "1">
\n
'
)
self
.
file
.
write
(
' <tr bgcolor="#33CCFF" >
\n
'
)
self
.
file
.
write
(
' <th>Stage Name</th>
\n
'
)
self
.
file
.
write
(
' <th>Image Kind</th>
\n
'
)
self
.
file
.
write
(
' <th>OAI NRF cNF</th>
\n
'
)
self
.
file
.
write
(
' <th>OAI NRF <font color="Gold">Ubuntu18</font> Image</th>
\n
'
)
self
.
file
.
write
(
' <th>OAI NRF <font color="Gold">RHEL8</font> Image</th>
\n
'
)
self
.
file
.
write
(
' </tr>
\n
'
)
def
buildSummaryFooter
(
self
):
...
...
@@ -401,13 +399,15 @@ class HtmlReport():
def
analyze_docker_build_git_part
(
self
,
nfType
):
if
nfType
!=
'NRF'
:
self
.
file
.
write
(
' <td>N/A</td>
\n
'
)
self
.
file
.
write
(
' <td>Wrong NF Type for this Report</td>
\n
'
)
self
.
file
.
write
(
' <td
colspan="2"
>Wrong NF Type for this Report</td>
\n
'
)
return
logFileName
=
'nrf_docker_image_build.log'
self
.
file
.
write
(
' <td>Builder Image</td>
\n
'
)
cwd
=
os
.
getcwd
()
variants
=
[
'docker'
,
'podman'
]
for
variant
in
variants
:
logFileName
=
'nrf_'
+
variant
+
'_image_build.log'
if
os
.
path
.
isfile
(
cwd
+
'/archives/'
+
logFileName
):
status
=
False
section_start_pattern
=
'git config --global http'
...
...
@@ -447,13 +447,15 @@ class HtmlReport():
def
analyze_install_log
(
self
,
nfType
):
if
nfType
!=
'NRF'
:
self
.
file
.
write
(
' <td>N/A</td>
\n
'
)
self
.
file
.
write
(
' <td>Wrong NF Type for this Report</td>
\n
'
)
self
.
file
.
write
(
' <td
colspan="2"
>Wrong NF Type for this Report</td>
\n
'
)
return
logFileName
=
'nrf_docker_image_build.log'
self
.
file
.
write
(
' <td>Builder Image</td>
\n
'
)
cwd
=
os
.
getcwd
()
variants
=
[
'docker'
,
'podman'
]
for
variant
in
variants
:
logFileName
=
'nrf_'
+
variant
+
'_image_build.log'
if
os
.
path
.
isfile
(
cwd
+
'/archives/'
+
logFileName
):
status
=
False
section_start_pattern
=
'build_nrf --install-deps --force'
...
...
@@ -470,8 +472,12 @@ class HtmlReport():
pistache_build_status
=
False
json_build_start
=
False
json_build_status
=
False
base_image
=
False
with
open
(
cwd
+
'/archives/'
+
logFileName
,
'r'
)
as
logfile
:
for
line
in
logfile
:
result
=
re
.
search
(
'FROM oai-nrf-base'
,
line
)
if
result
is
not
None
:
base_image
=
True
result
=
re
.
search
(
section_start_pattern
,
line
)
if
result
is
not
None
:
section_status
=
True
...
...
@@ -512,34 +518,49 @@ class HtmlReport():
if
result
is
not
None
:
json_build_status
=
True
logfile
.
close
()
if
status
:
if
base_image
:
cell_msg
=
' <td bgcolor="LimeGreen"><pre style="border:none; background-color:LimeGreen"><b>'
cell_msg
+=
'N/A:
\n
'
elif
status
:
cell_msg
=
' <td bgcolor="LimeGreen"><pre style="border:none; background-color:LimeGreen"><b>'
cell_msg
+=
'OK:
\n
'
else
:
cell_msg
=
' <td bgcolor="Tomato"><pre style="border:none; background-color:Tomato"><b>'
cell_msg
+=
'KO:
\n
'
cell_msg
+=
' -- build_nrf --install-deps --force
\n
'
if
package_install
:
if
base_image
:
cell_msg
+=
' ** Packages Installation: N/A
\n
'
elif
package_install
:
cell_msg
+=
' ** Packages Installation: OK
\n
'
else
:
cell_msg
+=
' ** Packages Installation: KO
\n
'
if
fmt_build_status
:
if
base_image
:
cell_msg
+=
' ** fmt Installation: N/A
\n
'
elif
fmt_build_status
:
cell_msg
+=
' ** fmt Installation: OK
\n
'
else
:
cell_msg
+=
' ** fmt Installation: KO
\n
'
if
folly_build_status
:
if
base_image
:
cell_msg
+=
' ** folly Installation: N/A
\n
'
elif
folly_build_status
:
cell_msg
+=
' ** folly Installation: OK
\n
'
else
:
cell_msg
+=
' ** folly Installation: KO
\n
'
if
spdlog_build_status
:
if
base_image
:
cell_msg
+=
' ** spdlog Installation: N/A
\n
'
elif
spdlog_build_status
:
cell_msg
+=
' ** spdlog Installation: OK
\n
'
else
:
cell_msg
+=
' ** spdlog Installation: KO
\n
'
if
pistache_build_status
:
if
base_image
:
cell_msg
+=
' ** pistache Installation: N/A
\n
'
elif
pistache_build_status
:
cell_msg
+=
' ** pistache Installation: OK
\n
'
else
:
cell_msg
+=
' ** pistache Installation: KO
\n
'
if
json_build_status
:
if
base_image
:
cell_msg
+=
' ** Nlohmann Json Installation: N/A
\n
'
elif
json_build_status
:
cell_msg
+=
' ** Nlohmann Json Installation: OK
\n
'
else
:
cell_msg
+=
' ** Nlohmann Json Installation: KO
\n
'
...
...
@@ -563,15 +584,16 @@ class HtmlReport():
if
nfType
!=
'NRF'
:
if
imageKind
:
self
.
file
.
write
(
' <td>N/A</td>
\n
'
)
self
.
file
.
write
(
' <td>Wrong NF Type for this Report</td>
\n
'
)
self
.
file
.
write
(
' <td
colspan="2"
>Wrong NF Type for this Report</td>
\n
'
)
return
if
nfType
==
'NRF'
:
logFileName
=
'nrf_docker_image_build.log'
if
imageKind
:
self
.
file
.
write
(
' <td>Builder Image</td>
\n
'
)
cwd
=
os
.
getcwd
()
variants
=
[
'docker'
,
'podman'
]
for
variant
in
variants
:
logFileName
=
'nrf_'
+
variant
+
'_image_build.log'
if
os
.
path
.
isfile
(
cwd
+
'/archives/'
+
logFileName
):
status
=
False
if
nfType
==
'NRF'
:
...
...
@@ -609,18 +631,18 @@ class HtmlReport():
if
nfType
!=
'NRF'
:
if
imageKind
:
self
.
file
.
write
(
' <td>N/A</td>
\n
'
)
self
.
file
.
write
(
' <td>Wrong NF Type for this Report</td>
\n
'
)
self
.
file
.
write
(
' <td
colspan="2"
>Wrong NF Type for this Report</td>
\n
'
)
return
if
nfType
==
'NRF'
:
logFileName
=
'nrf_docker_image_build.log'
if
imageKind
:
self
.
file
.
write
(
' <td>Builder Image</td>
\n
'
)
cwd
=
os
.
getcwd
()
variants
=
[
'docker'
,
'podman'
]
for
variant
in
variants
:
logFileName
=
'nrf_'
+
variant
+
'_image_build.log'
nb_errors
=
0
nb_warnings
=
0
if
os
.
path
.
isfile
(
cwd
+
'/archives/'
+
logFileName
):
if
nfType
==
'NRF'
:
section_start_pattern
=
'build_nrf --clean --Verbose --build-type Release --jobs'
...
...
@@ -675,13 +697,15 @@ class HtmlReport():
def
analyze_copy_log
(
self
,
nfType
):
if
nfType
!=
'NRF'
:
self
.
file
.
write
(
' <td>N/A</td>
\n
'
)
self
.
file
.
write
(
' <td>Wrong NF Type for this Report</td>
\n
'
)
self
.
file
.
write
(
' <td
colspan="2"
>Wrong NF Type for this Report</td>
\n
'
)
return
logFileName
=
'nrf_docker_image_build.log'
self
.
file
.
write
(
' <td>Target Image</td>
\n
'
)
cwd
=
os
.
getcwd
()
variants
=
[
'docker'
,
'podman'
]
for
variant
in
variants
:
logFileName
=
'nrf_'
+
variant
+
'_image_build.log'
if
os
.
path
.
isfile
(
cwd
+
'/archives/'
+
logFileName
):
section_start_pattern
=
'FROM ubuntu:bionic as oai-nrf$'
section_end_pattern
=
'COPY --from=oai-nrf-builder /openair-nrf/scripts/entrypoint.sh entrypoint.sh'
...
...
@@ -719,16 +743,21 @@ class HtmlReport():
def
analyze_copy_conf_tool_log
(
self
,
nfType
):
if
nfType
!=
'NRF'
:
self
.
file
.
write
(
' <td>N/A</td>
\n
'
)
self
.
file
.
write
(
' <td>Wrong NF Type for this Report</td>
\n
'
)
self
.
file
.
write
(
' <td
colspan="2"
>Wrong NF Type for this Report</td>
\n
'
)
return
logFileName
=
'nrf_docker_image_build.log'
self
.
file
.
write
(
' <td>Target Image</td>
\n
'
)
cwd
=
os
.
getcwd
()
variants
=
[
'docker'
,
'podman'
]
for
variant
in
variants
:
logFileName
=
'nrf_'
+
variant
+
'_image_build.log'
if
os
.
path
.
isfile
(
cwd
+
'/archives/'
+
logFileName
):
section_start_pattern
=
'WORKDIR /openair-nrf/etc'
if
variant
==
'docker'
:
section_end_pattern
=
'Successfully tagged oai-nrf'
else
:
section_end_pattern
=
'COMMIT oai-nrf:'
section_status
=
False
status
=
False
with
open
(
cwd
+
'/archives/'
+
logFileName
,
'r'
)
as
logfile
:
...
...
@@ -764,19 +793,24 @@ class HtmlReport():
if
nfType
!=
'NRF'
:
if
imageKind
:
self
.
file
.
write
(
' <td>N/A</td>
\n
'
)
self
.
file
.
write
(
' <td>Wrong NF Type for this Report</td>
\n
'
)
self
.
file
.
write
(
' <td
colspan="2"
>Wrong NF Type for this Report</td>
\n
'
)
return
if
nfType
==
'NRF'
:
logFileName
=
'nrf_docker_image_build.log'
if
imageKind
:
self
.
file
.
write
(
' <td>Target Image</td>
\n
'
)
cwd
=
os
.
getcwd
()
variants
=
[
'docker'
,
'podman'
]
for
variant
in
variants
:
logFileName
=
'nrf_'
+
variant
+
'_image_build.log'
if
os
.
path
.
isfile
(
cwd
+
'/archives/'
+
logFileName
):
if
nfType
==
'NRF'
:
if
variant
==
'docker'
:
section_start_pattern
=
'Successfully tagged oai-nrf'
section_end_pattern
=
'OAI-SMF DOCKER IMAGE BUILD'
section_end_pattern
=
'OAI-NRF DOCKER IMAGE BUILD'
else
:
section_start_pattern
=
'COMMIT oai-nrf:'
section_end_pattern
=
'OAI-NRF PODMAN RHEL8 IMAGE BUILD'
section_status
=
False
status
=
False
with
open
(
cwd
+
'/archives/'
+
logFileName
,
'r'
)
as
logfile
:
...
...
@@ -794,7 +828,10 @@ class HtmlReport():
else
:
result
=
re
.
search
(
'oai-nrf *develop'
,
line
)
if
result
is
not
None
:
if
variant
==
'docker'
:
result
=
re
.
search
(
'ago *([0-9A-Z]+)'
,
line
)
else
:
result
=
re
.
search
(
'ago *([0-9]+ [A-Z]+)'
,
line
)
if
result
is
not
None
:
size
=
result
.
group
(
1
)
status
=
True
...
...
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