Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
oai-cn5g-fed
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Model registry
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
oai
cn5g
oai-cn5g-fed
Commits
d08491bb
Commit
d08491bb
authored
4 years ago
by
ismail
Browse files
Options
Downloads
Patches
Plain Diff
CI: fix in the pipline
Signed-off-by:
ismail
<
mohammed.ismail@openairinterface.org
>
parent
66d5d838
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
ci-scripts/Jenkinsfile-GitLab-Docker
+11
-4
11 additions, 4 deletions
ci-scripts/Jenkinsfile-GitLab-Docker
ci-scripts/dsTestDeployTools.py
+3
-3
3 additions, 3 deletions
ci-scripts/dsTestDeployTools.py
ci-scripts/dsTestGenerateHTMLReport.py
+23
-23
23 additions, 23 deletions
ci-scripts/dsTestGenerateHTMLReport.py
with
37 additions
and
30 deletions
ci-scripts/Jenkinsfile-GitLab-Docker
+
11
−
4
View file @
d08491bb
...
@@ -180,6 +180,11 @@ pipeline {
...
@@ -180,6 +180,11 @@ pipeline {
myShCmd
(
'./scripts/syncComponents.sh'
,
new_host_flag
,
new_host_user
,
new_host
)
myShCmd
(
'./scripts/syncComponents.sh'
,
new_host_flag
,
new_host_user
,
new_host
)
}
}
}
}
if
((!
upstreamEvent
)
&&
(!
scmEvent
))
{
sh
"git clean -x -d -f > /dev/null 2>&1"
sh
'./scripts/syncComponents.sh --hss-branch '
+
hssBranch
+
' --mme-branch '
+
mmeBranch
+
' --spgwc-branch '
+
spgwcBranch
+
' --spgwu-tiny-branch '
+
spgwuBranch
sh
"mkdir -p archives DS-TEST-RESULTS"
}
}
}
}
}
}
}
...
@@ -221,10 +226,12 @@ pipeline {
...
@@ -221,10 +226,12 @@ pipeline {
steps
{
steps
{
lock
(
ds_tester_ci_resource
)
{
lock
(
ds_tester_ci_resource
)
{
script
{
script
{
myShCmd
(
'cd /home/oaici/CI-dev-ops-cn5g && git clean -x -d -f > /dev/null'
,
new_host_flag
,
new_host_user
,
new_host
)
//myShCmd('cd /home/oaici/CI-dev-ops-cn && git clean -x -d -f > /dev/null', new_host_flag, new_host_user, new_host)
myShCmdWithLog
(
'cd /home/oaici/CI-dev-ops-cn5g/scripts && CI_ENV=True SRC_BASE_DIR=/tmp/CI-CN5G-FED ./run-5gc.bash -pt --shark --detach --get-results --5g'
,
'archives/run-5g-dstester.log'
,
new_host_flag
,
new_host_user
,
new_host
)
//myShCmdWithLog('cd /home/oaici/CI-dev-ops-cn/scripts && CI_ENV=True SRC_BASE_DIR=/tmp/CI-CN-FED ./run-4gc.bash -pt --shark --detach --get-results --4g', 'archives/run-4g-dstester.log', new_host_flag, new_host_user, new_host)
copyFrom2ndServer
(
'DS-TEST-RESULTS/status.txt'
,
'DS-TEST-RESULTS'
,
new_host_flag
,
new_host_user
,
new_host
)
//copyFrom2ndServer('DS-TEST-RESULTS/status.txt', 'DS-TEST-RESULTS', new_host_flag, new_host_user, new_host)
copyFrom2ndServer
(
'DS-TEST-RESULTS/*.tar'
,
'DS-TEST-RESULTS'
,
new_host_flag
,
new_host_user
,
new_host
)
//copyFrom2ndServer('DS-TEST-RESULTS/*.tar', 'DS-TEST-RESULTS', new_host_flag, new_host_user, new_host)
sh
'cd /home/oaici/CI-dev-ops-cn && git clean -x -d -f > /dev/null'
sh
'cd /home/oaici/CI-dev-ops-cn/scripts && export PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:.:/usr/local/devsol/bin && CI_ENV=True SRC_BASE_DIR='
+
WORKSPACE
+
' ./run-4gc.bash -pt --shark --detach --get-results --4g > '
+
WORKSPACE
+
'/archives/run-4g-dstester.log 2>&1'
sh
'python3 ./ci-scripts/dsTestGenerateHTMLReport.py --job_name='
+
JOB_NAME
+
' --job_id='
+
BUILD_ID
+
' --job_url='
+
BUILD_URL
sh
'python3 ./ci-scripts/dsTestGenerateHTMLReport.py --job_name='
+
JOB_NAME
+
' --job_id='
+
BUILD_ID
+
' --job_url='
+
BUILD_URL
}
}
}
}
...
...
This diff is collapsed.
Click to expand it.
ci-scripts/dsTestDeployTools.py
+
3
−
3
View file @
d08491bb
...
@@ -89,7 +89,7 @@ class deployForDsTester():
...
@@ -89,7 +89,7 @@ class deployForDsTester():
time
.
sleep
(
2
)
time
.
sleep
(
2
)
pass
pass
time
.
sleep
(
2
)
time
.
sleep
(
2
)
subprocess_run_w_echo
(
'
docker exec
-it
cicd-mysql-svr /bin/bash -c
"
mysql -uroot -psecretPassword < /home/mysql-complete.cmd
"'
)
subprocess_run_w_echo
(
'
docker exec cicd-mysql-svr /bin/bash -c
"
mysql -uroot -psecretPassword < /home/mysql-complete.cmd
"'
)
def
deployAMF
(
self
):
def
deployAMF
(
self
):
res
=
''
res
=
''
...
@@ -107,7 +107,7 @@ class deployForDsTester():
...
@@ -107,7 +107,7 @@ class deployForDsTester():
subprocess_run_w_echo
(
'
docker run --privileged --name cicd-oai-amf --network cicd-oai-public-net --ip
'
+
CICD_AMF_PUBLIC_ADDR
+
'
-d oai-amf:
'
+
self
.
tag
+
'
/bin/bash -c
"
sleep infinity
"'
)
subprocess_run_w_echo
(
'
docker run --privileged --name cicd-oai-amf --network cicd-oai-public-net --ip
'
+
CICD_AMF_PUBLIC_ADDR
+
'
-d oai-amf:
'
+
self
.
tag
+
'
/bin/bash -c
"
sleep infinity
"'
)
subprocess_run_w_echo
(
'
sed -e
"
s@CI_NGAP_IF_NAME@eth0@
"
-e
"
s@CI_N11_IF_NAME@eth0@
"
-e
"
s@CI_SMF0_IP_ADDRESS@
'
+
CICD_SMF_PUBLIC_ADDR
+
'
@
"
-e
"
s@CI_SMF1_IP_ADDRESS@
'
+
CICD_DUMMY_SMF_PUBLIC_ADDR
+
'
@
"
-e
"
s@CI_MYSQL_IP_ADDRESS@
'
+
CICD_MYSQL_PUBLIC_ADDR
+
'
@
"
ci-scripts/temp/generate_amf_conf.sh > ci-scripts/temp/ci-generate_amf_conf.sh
'
)
subprocess_run_w_echo
(
'
sed -e
"
s@CI_NGAP_IF_NAME@eth0@
"
-e
"
s@CI_N11_IF_NAME@eth0@
"
-e
"
s@CI_SMF0_IP_ADDRESS@
'
+
CICD_SMF_PUBLIC_ADDR
+
'
@
"
-e
"
s@CI_SMF1_IP_ADDRESS@
'
+
CICD_DUMMY_SMF_PUBLIC_ADDR
+
'
@
"
-e
"
s@CI_MYSQL_IP_ADDRESS@
'
+
CICD_MYSQL_PUBLIC_ADDR
+
'
@
"
ci-scripts/temp/generate_amf_conf.sh > ci-scripts/temp/ci-generate_amf_conf.sh
'
)
subprocess_run_w_echo
(
'
docker cp ci-scripts/temp/ci-generate_amf_conf.sh cicd-oai-amf:/openair-amf/generate_amf_conf.sh
'
)
subprocess_run_w_echo
(
'
docker cp ci-scripts/temp/ci-generate_amf_conf.sh cicd-oai-amf:/openair-amf/generate_amf_conf.sh
'
)
subprocess_run_w_echo
(
'
docker exec
-it
cicd-oai-amf /bin/bash -c
"
chmod 755 generate_amf_conf.sh && ./generate_amf_conf.sh
"
> archives/amf_config.log
'
)
subprocess_run_w_echo
(
'
docker exec cicd-oai-amf /bin/bash -c
"
chmod 755 generate_amf_conf.sh && ./generate_amf_conf.sh
"
> archives/amf_config.log
'
)
def
deploySMF
(
self
):
def
deploySMF
(
self
):
res
=
''
res
=
''
...
@@ -125,7 +125,7 @@ class deployForDsTester():
...
@@ -125,7 +125,7 @@ class deployForDsTester():
subprocess_run_w_echo
(
'
docker run --privileged --name cicd-oai-smf --network cicd-oai-public-net --ip
'
+
CICD_SMF_PUBLIC_ADDR
+
'
-d oai-smf:
'
+
self
.
tag
+
'
/bin/bash -c
"
sleep infinity
"'
)
subprocess_run_w_echo
(
'
docker run --privileged --name cicd-oai-smf --network cicd-oai-public-net --ip
'
+
CICD_SMF_PUBLIC_ADDR
+
'
-d oai-smf:
'
+
self
.
tag
+
'
/bin/bash -c
"
sleep infinity
"'
)
subprocess_run_w_echo
(
'
sed -e
"
s@CI_N4_IF_NAME@eth0@
"
-e
"
s@CI_SBI_IF_NAME@eth0@
"
-e
"
s@CI_AMF_IP_ADDR@
'
+
CICD_AMF_PUBLIC_ADDR
+
'
@
"
-e
"
s@CI_UPF_IP_ADDR@
'
+
CICD_UPF_PUBLIC_ADDR
+
'
@
"
ci-scripts/temp/generate_smf_conf.sh > ci-scripts/temp/ci-generate_smf_conf.sh
'
)
subprocess_run_w_echo
(
'
sed -e
"
s@CI_N4_IF_NAME@eth0@
"
-e
"
s@CI_SBI_IF_NAME@eth0@
"
-e
"
s@CI_AMF_IP_ADDR@
'
+
CICD_AMF_PUBLIC_ADDR
+
'
@
"
-e
"
s@CI_UPF_IP_ADDR@
'
+
CICD_UPF_PUBLIC_ADDR
+
'
@
"
ci-scripts/temp/generate_smf_conf.sh > ci-scripts/temp/ci-generate_smf_conf.sh
'
)
subprocess_run_w_echo
(
'
docker cp ci-scripts/temp/ci-generate_smf_conf.sh cicd-oai-smf:/openair-smf/generate_smf_conf.sh
'
)
subprocess_run_w_echo
(
'
docker cp ci-scripts/temp/ci-generate_smf_conf.sh cicd-oai-smf:/openair-smf/generate_smf_conf.sh
'
)
subprocess_run_w_echo
(
'
docker exec
-it
cicd-oai-smf /bin/bash -c
"
chmod 755 generate_smf_conf.sh && ./generate_smf_conf.sh
"
> archives/smf_config.log
'
)
subprocess_run_w_echo
(
'
docker exec cicd-oai-smf /bin/bash -c
"
chmod 755 generate_smf_conf.sh && ./generate_smf_conf.sh
"
> archives/smf_config.log
'
)
def
deployUPF
(
self
):
def
deployUPF
(
self
):
res
=
''
res
=
''
...
...
This diff is collapsed.
Click to expand it.
ci-scripts/dsTestGenerateHTMLReport.py
+
23
−
23
View file @
d08491bb
...
@@ -63,15 +63,15 @@ class HtmlReport():
...
@@ -63,15 +63,15 @@ class HtmlReport():
self
.
file
.
write
(
'
<body><div class=
"
container
"
>
\n
'
)
self
.
file
.
write
(
'
<body><div class=
"
container
"
>
\n
'
)
self
.
file
.
write
(
'
<table width =
"
100%
"
style=
"
border-collapse: collapse; border: none;
"
>
\n
'
)
self
.
file
.
write
(
'
<table width =
"
100%
"
style=
"
border-collapse: collapse; border: none;
"
>
\n
'
)
self
.
file
.
write
(
'
<tr style=
"
border-collapse: collapse; border: none;
"
>
\n
'
)
self
.
file
.
write
(
'
<tr style=
"
border-collapse: collapse; border: none;
"
>
\n
'
)
self
.
file
.
write
(
'
<td style=
"
border-collapse: collapse; border: none;
"
>
\n
'
)
self
.
file
.
write
(
'
<td style=
"
border-collapse: collapse; border: none;
"
>
\n
'
)
self
.
file
.
write
(
'
<a href=
"
http://www.openairinterface.org/
"
>
\n
'
)
self
.
file
.
write
(
'
<a href=
"
http://www.openairinterface.org/
"
>
\n
'
)
self
.
file
.
write
(
'
<img src=
"
http://www.openairinterface.org/wp-content/uploads/2016/03/cropped-oai_final_logo2.png
"
alt=
""
border=
"
none
"
height=50 width=150>
\n
'
)
self
.
file
.
write
(
'
<img src=
"
http://www.openairinterface.org/wp-content/uploads/2016/03/cropped-oai_final_logo2.png
"
alt=
""
border=
"
none
"
height=50 width=150>
\n
'
)
self
.
file
.
write
(
'
</img>
\n
'
)
self
.
file
.
write
(
'
</img>
\n
'
)
self
.
file
.
write
(
'
</a>
\n
'
)
self
.
file
.
write
(
'
</a>
\n
'
)
self
.
file
.
write
(
'
</td>
\n
'
)
self
.
file
.
write
(
'
</td>
\n
'
)
self
.
file
.
write
(
'
<td style=
"
border-collapse: collapse; border: none; vertical-align: center;
"
>
\n
'
)
self
.
file
.
write
(
'
<td style=
"
border-collapse: collapse; border: none; vertical-align: center;
"
>
\n
'
)
self
.
file
.
write
(
'
<b><font size =
"
6
"
>Job Summary -- Job:
'
+
self
.
job_name
+
'
-- Build-ID: <a href=
"'
+
self
.
job_url
+
'"
>
'
+
self
.
job_id
+
'
</a></font></b>
\n
'
)
self
.
file
.
write
(
'
<b><font size =
"
6
"
>Job Summary -- Job:
'
+
self
.
job_name
+
'
-- Build-ID: <a href=
"'
+
self
.
job_url
+
'"
>
'
+
self
.
job_id
+
'
</a></font></b>
\n
'
)
self
.
file
.
write
(
'
</td>
\n
'
)
self
.
file
.
write
(
'
</td>
\n
'
)
self
.
file
.
write
(
'
</tr>
\n
'
)
self
.
file
.
write
(
'
</tr>
\n
'
)
self
.
file
.
write
(
'
</table>
\n
'
)
self
.
file
.
write
(
'
</table>
\n
'
)
self
.
file
.
write
(
'
<br>
\n
'
)
self
.
file
.
write
(
'
<br>
\n
'
)
...
@@ -98,15 +98,15 @@ class HtmlReport():
...
@@ -98,15 +98,15 @@ class HtmlReport():
if
finalStatusOK
:
if
finalStatusOK
:
self
.
file
.
write
(
'
<div class=
"
alert alert-success
"
>
\n
'
)
self
.
file
.
write
(
'
<div class=
"
alert alert-success
"
>
\n
'
)
self
.
file
.
write
(
'
<strong>Successful DsTester suite! <span class=
"
glyphicon glyphicon-warning-sign
"
></span></strong>
\n
'
)
self
.
file
.
write
(
'
<strong>Successful DsTester suite! <span class=
"
glyphicon glyphicon-warning-sign
"
></span></strong>
\n
'
)
self
.
file
.
write
(
'
</div>
\n
'
)
self
.
file
.
write
(
'
</div>
\n
'
)
else
:
else
:
self
.
file
.
write
(
'
<div class=
"
alert alert-danger
"
>
\n
'
)
self
.
file
.
write
(
'
<div class=
"
alert alert-danger
"
>
\n
'
)
self
.
file
.
write
(
'
<strong>Failed DsTester suite! <span class=
"
glyphicon glyphicon-warning-sign
"
></span></strong>
\n
'
)
self
.
file
.
write
(
'
<strong>Failed DsTester suite! <span class=
"
glyphicon glyphicon-warning-sign
"
></span></strong>
\n
'
)
self
.
file
.
write
(
'
</div>
\n
'
)
self
.
file
.
write
(
'
</div>
\n
'
)
else
:
else
:
self
.
file
.
write
(
'
<div class=
"
alert alert-warning
"
>
\n
'
)
self
.
file
.
write
(
'
<div class=
"
alert alert-warning
"
>
\n
'
)
self
.
file
.
write
(
'
<strong>LogFile not available! <span class=
"
glyphicon glyphicon-warning-sign
"
></span></strong>
\n
'
)
self
.
file
.
write
(
'
<strong>LogFile not available! <span class=
"
glyphicon glyphicon-warning-sign
"
></span></strong>
\n
'
)
self
.
file
.
write
(
'
</div>
\n
'
)
self
.
file
.
write
(
'
</div>
\n
'
)
return
finalStatusOK
return
finalStatusOK
...
@@ -118,11 +118,11 @@ class HtmlReport():
...
@@ -118,11 +118,11 @@ class HtmlReport():
self
.
file
.
write
(
'
<button data-toggle=
"
collapse
"
data-target=
"
#ds-tester-details
"
>More details on DsTester results</button>
\n
'
)
self
.
file
.
write
(
'
<button data-toggle=
"
collapse
"
data-target=
"
#ds-tester-details
"
>More details on DsTester results</button>
\n
'
)
self
.
file
.
write
(
'
<div id=
"
ds-tester-details
"
class=
"
collapse
"
>
\n
'
)
self
.
file
.
write
(
'
<div id=
"
ds-tester-details
"
class=
"
collapse
"
>
\n
'
)
self
.
file
.
write
(
'
<table class=
"
table-bordered
"
width =
"
60%
"
align =
"
center
"
border = 1>
\n
'
)
self
.
file
.
write
(
'
<table class=
"
table-bordered
"
width =
"
60%
"
align =
"
center
"
border = 1>
\n
'
)
self
.
file
.
write
(
'
<tr bgcolor =
"
#33CCFF
"
>
\n
'
)
self
.
file
.
write
(
'
<tr bgcolor =
"
#33CCFF
"
>
\n
'
)
self
.
file
.
write
(
'
<th>Test Name</th>
\n
'
)
self
.
file
.
write
(
'
<th>Test Name</th>
\n
'
)
self
.
file
.
write
(
'
<th>Test Status</th>
\n
'
)
self
.
file
.
write
(
'
<th>Test Status</th>
\n
'
)
self
.
file
.
write
(
'
<th>Test Details</th>
\n
'
)
self
.
file
.
write
(
'
<th>Test Details</th>
\n
'
)
self
.
file
.
write
(
'
</tr>
\n
'
)
self
.
file
.
write
(
'
</tr>
\n
'
)
dsTesterDetailsLog
=
'
archives/run-5g-dstester.log
'
dsTesterDetailsLog
=
'
archives/run-5g-dstester.log
'
cwd
=
os
.
getcwd
()
cwd
=
os
.
getcwd
()
if
os
.
path
.
isfile
(
cwd
+
'
/
'
+
dsTesterDetailsLog
):
if
os
.
path
.
isfile
(
cwd
+
'
/
'
+
dsTesterDetailsLog
):
...
@@ -146,16 +146,16 @@ class HtmlReport():
...
@@ -146,16 +146,16 @@ class HtmlReport():
testName
=
line
.
replace
(
'
Running
'
,
''
)
testName
=
line
.
replace
(
'
Running
'
,
''
)
result
=
re
.
search
(
'
status:
'
,
line
)
result
=
re
.
search
(
'
status:
'
,
line
)
if
result
is
not
None
:
if
result
is
not
None
:
self
.
file
.
write
(
'
<tr>
\n
'
)
self
.
file
.
write
(
'
<tr>
\n
'
)
self
.
file
.
write
(
'
<td>
'
+
testName
+
'
</td>
\n
'
)
self
.
file
.
write
(
'
<td>
'
+
testName
+
'
</td>
\n
'
)
result
=
re
.
search
(
'
FAILED
'
,
line
)
result
=
re
.
search
(
'
FAILED
'
,
line
)
if
result
is
not
None
:
if
result
is
not
None
:
self
.
file
.
write
(
'
<td bgcolor =
"
Red
"
><b><font color=
"
white
"
>KO</font></b></td>
\n
'
)
self
.
file
.
write
(
'
<td bgcolor =
"
Red
"
><b><font color=
"
white
"
>KO</font></b></td>
\n
'
)
else
:
else
:
self
.
file
.
write
(
'
<td bgcolor =
"
DarkGreen
"
><b><font color=
"
white
"
>OK</font></b></td>
\n
'
)
self
.
file
.
write
(
'
<td bgcolor =
"
DarkGreen
"
><b><font color=
"
white
"
>OK</font></b></td>
\n
'
)
testDetails
+=
'
</pre>
\n
'
testDetails
+=
'
</pre>
\n
'
self
.
file
.
write
(
'
<td>
'
+
testDetails
+
'
</td>
\n
'
)
self
.
file
.
write
(
'
<td>
'
+
testDetails
+
'
</td>
\n
'
)
self
.
file
.
write
(
'
</tr>
\n
'
)
self
.
file
.
write
(
'
</tr>
\n
'
)
testDetails
=
'
<pre style=
"
background-color:white
"
>
\n
'
testDetails
=
'
<pre style=
"
background-color:white
"
>
\n
'
detailsLog
.
close
()
detailsLog
.
close
()
else
:
else
:
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment