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
spbro
OpenXG-RAN
Commits
65549745
Commit
65549745
authored
Oct 25, 2023
by
Raphael Defosseux
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix(ci): proper automatic undeployment
Signed-off-by:
Raphael Defosseux
<
raphael.defosseux@eurecom.fr
>
parent
a88c3d2b
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
2 deletions
+11
-2
ci-scripts/cls_containerize.py
ci-scripts/cls_containerize.py
+3
-0
ci-scripts/cls_oaicitest.py
ci-scripts/cls_oaicitest.py
+8
-2
No files found.
ci-scripts/cls_containerize.py
View file @
65549745
...
...
@@ -289,6 +289,7 @@ class Containerize():
self
.
proxyCommit
=
None
self
.
eNB_instance
=
0
self
.
eNB_serverId
=
[
''
,
''
,
''
]
self
.
deployKind
=
[
True
,
True
,
True
]
self
.
yamlPath
=
[
''
,
''
,
''
]
self
.
services
=
[
''
,
''
,
''
]
self
.
nb_healthy
=
[
0
,
0
,
0
]
...
...
@@ -835,6 +836,7 @@ class Containerize():
HELP
.
GenericHelp
(
CONST
.
Version
)
sys
.
exit
(
'Insufficient Parameter'
)
logging
.
debug
(
'
\u001B
[1m Deploying OAI Object on server: '
+
lIpAddr
+
'
\u001B
[0m'
)
self
.
deployKind
[
self
.
eNB_instance
]
=
True
mySSH
=
SSH
.
SSHConnection
()
mySSH
.
open
(
lIpAddr
,
lUserName
,
lPassWord
)
...
...
@@ -1037,6 +1039,7 @@ class Containerize():
logging
.
debug
(
'
\u001B
[1m Checking Services to deploy
\u001B
[0m'
)
# Implicitly we are running locally
myCmd
=
cls_cmd
.
LocalCmd
(
d
=
self
.
yamlPath
[
0
])
self
.
deployKind
[
0
]
=
False
cmd
=
'docker-compose config --services'
listServices
=
myCmd
.
run
(
cmd
)
if
listServices
.
returncode
!=
0
:
...
...
ci-scripts/cls_oaicitest.py
View file @
65549745
...
...
@@ -1358,7 +1358,10 @@ class OaiCiTest():
for
instance
in
range
(
0
,
len
(
CONTAINERS
.
yamlPath
)):
if
CONTAINERS
.
yamlPath
[
instance
]
!=
''
:
CONTAINERS
.
eNB_instance
=
instance
CONTAINERS
.
UndeployObject
(
HTML
,
RAN
)
if
CONTAINERS
.
deployKind
[
instance
]:
CONTAINERS
.
UndeployObject
(
HTML
,
RAN
)
else
:
CONTAINERS
.
UndeployGenObject
(
HTML
,
RAN
,
self
)
RAN
.
prematureExit
=
True
#this function is called only if eNB/gNB fails to start
...
...
@@ -1385,7 +1388,10 @@ class OaiCiTest():
for
instance
in
range
(
0
,
len
(
CONTAINERS
.
yamlPath
)):
if
CONTAINERS
.
yamlPath
[
instance
]
!=
''
:
CONTAINERS
.
eNB_instance
=
instance
CONTAINERS
.
UndeployObject
(
HTML
,
RAN
)
if
CONTAINERS
.
deployKind
[
instance
]:
CONTAINERS
.
UndeployObject
(
HTML
,
RAN
)
else
:
CONTAINERS
.
UndeployGenObject
(
HTML
,
RAN
,
self
)
RAN
.
prematureExit
=
True
def
IdleSleep
(
self
,
HTML
):
...
...
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