Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
OpenXG-RAN
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
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
lizhongxiao
OpenXG-RAN
Commits
d5b78067
Commit
d5b78067
authored
May 03, 2023
by
Jaroslava Fiedlerova
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
CI: AW2S pipeline - CN deployment on OC - CN path, OC project changed
parent
d237e43f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
6 deletions
+8
-6
ci-scripts/epc.py
ci-scripts/epc.py
+8
-6
No files found.
ci-scripts/epc.py
View file @
d5b78067
...
...
@@ -240,9 +240,9 @@ class EPCManagement():
HTML
.
CreateHtmlTestRow
(
self
.
Type
,
'OK'
,
CONST
.
ALL_PROCESSES_OK
)
def
Initialize5GCN
(
self
,
HTML
):
if
self
.
IPAddress
==
''
or
self
.
UserName
==
''
or
self
.
Password
==
''
or
self
.
SourceCodePath
==
''
or
self
.
Type
==
''
:
if
self
.
IPAddress
==
''
or
self
.
UserName
==
''
or
self
.
Password
==
''
or
self
.
Type
==
''
:
HELP
.
GenericHelp
(
CONST
.
Version
)
HELP
.
EPCSrvHelp
(
self
.
IPAddress
,
self
.
UserName
,
self
.
Password
,
self
.
SourceCodePath
,
self
.
Type
)
HELP
.
EPCSrvHelp
(
self
.
IPAddress
,
self
.
UserName
,
self
.
Password
,
self
.
Type
)
sys
.
exit
(
'Insufficient EPC Parameters'
)
mySSH
=
cls_cmd
.
getConnection
(
self
.
IPAddress
)
html_cell
=
''
...
...
@@ -299,8 +299,9 @@ class EPCManagement():
imageNames
=
[
"oai-nrf"
,
"oai-amf"
,
"oai-smf"
,
"oai-spgwu-tiny"
,
"oai-ausf"
,
"oai-udm"
,
"oai-udr"
,
"mysql"
,
"oai-traffic-server"
]
logging
.
debug
(
'Deploying OAI CN5G on Openshift Cluster'
)
lIpAddr
=
self
.
IPAddress
lSourcePath
=
self
.
SourceCodePath
succeeded
=
OC
.
OC_login
(
mySSH
,
self
.
OCUserName
,
self
.
OCPassword
,
self
.
OCProjectName
)
lOcProject
=
'oaicicd-core-for-ci-ran'
lSourcePath
=
"/opt/oai-cn5g-fed-develop-2023-04-28-20897"
succeeded
=
OC
.
OC_login
(
mySSH
,
self
.
OCUserName
,
self
.
OCPassword
,
lOcProject
)
if
not
succeeded
:
logging
.
error
(
'
\u001B
[1m OC Cluster Login Failed
\u001B
[0m'
)
HTML
.
CreateHtmlTestRow
(
'N/A'
,
'KO'
,
CONST
.
OC_LOGIN_FAIL
)
...
...
@@ -595,11 +596,12 @@ class EPCManagement():
elif
re
.
match
(
'OC-OAI-CN5G'
,
self
.
Type
,
re
.
IGNORECASE
):
logging
.
debug
(
'Terminating OAI CN5G on Openshift Cluster'
)
lIpAddr
=
self
.
IPAddress
lOcProject
=
'oaicicd-core-for-ci-ran'
lSourcePath
=
self
.
SourceCodePath
mySSH
.
run
(
f'rm -Rf
{
lSourcePath
}
/logs'
)
mySSH
.
run
(
f'mkdir -p
{
lSourcePath
}
/logs'
)
logging
.
debug
(
'OC OAI CN5G - Collecting Log files to workspace'
)
succeeded
=
OC
.
OC_login
(
mySSH
,
self
.
OCUserName
,
self
.
OCPassword
,
self
.
OCProjectName
)
succeeded
=
OC
.
OC_login
(
mySSH
,
self
.
OCUserName
,
self
.
OCPassword
,
lOcProject
)
if
not
succeeded
:
logging
.
error
(
'
\u001B
[1m OC Cluster Login Failed
\u001B
[0m'
)
HTML
.
CreateHtmlTestRow
(
'N/A'
,
'KO'
,
CONST
.
OC_LOGIN_FAIL
)
...
...
@@ -618,7 +620,7 @@ class EPCManagement():
mySSH
.
run
(
f'cd
{
lSourcePath
}
/logs && zip -r -qq test_logs_CN.zip *.log'
)
mySSH
.
copyin
(
f'
{
lSourcePath
}
/logs/test_logs_CN.zip'
,
'test_logs_CN.zip'
)
ret
=
mySSH
.
run
(
f'oc get pods'
,
silent
=
True
)
res
=
re
.
search
(
'No resources found in oaicicd-ran
namespace.'
,
ret
.
stdout
)
res
=
re
.
search
(
f'No resources found in
{
lOcProject
}
namespace.'
,
ret
.
stdout
)
if
res
is
not
None
:
logging
.
debug
(
'OC OAI CN5G components uninstalled'
)
message
=
'OC OAI CN5G components uninstalled'
...
...
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