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
e1361431
Commit
e1361431
authored
Jul 13, 2023
by
Jaroslava Fiedlerova
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add constant for list of images in cls_containerize
parent
19514381
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
7 deletions
+7
-7
ci-scripts/cls_containerize.py
ci-scripts/cls_containerize.py
+7
-7
No files found.
ci-scripts/cls_containerize.py
View file @
e1361431
...
...
@@ -53,10 +53,13 @@ import sshconnection as SSH
import
helpreadme
as
HELP
import
constants
as
CONST
import
cls_oaicitest
#-----------------------------------------------------------
# Helper functions used here and in other classes
# (e.g., cls_cluster.py)
#-----------------------------------------------------------
IMAGES
=
[
'oai-enb'
,
'oai-lte-ru'
,
'oai-lte-ue'
,
'oai-gnb'
,
'oai-nr-cuup'
,
'oai-gnb-aw2s'
,
'oai-nr-ue'
]
def
CreateWorkspace
(
sshSession
,
sourcePath
,
ranRepository
,
ranCommitID
,
ranTargetBranch
,
ranAllowMerge
):
if
ranCommitID
==
''
:
logging
.
error
(
'need ranCommitID in CreateWorkspace()'
)
...
...
@@ -800,8 +803,7 @@ class Containerize():
logging
.
debug
(
'Removing test images locally'
)
myCmd
=
cls_cmd
.
LocalCmd
()
imageNames
=
[
'oai-enb'
,
'oai-gnb'
,
'oai-lte-ue'
,
'oai-nr-ue'
,
'oai-lte-ru'
,
'oai-nr-cuup'
,
'oai-gnb-aw2s'
]
for
image
in
imageNames
:
for
image
in
IMAGES
:
imageTag
=
ImageTagToUse
(
image
,
self
.
ranCommitID
,
self
.
ranBranch
,
self
.
ranAllowMerge
)
cmd
=
f'docker rmi oai-ci/
{
imageTag
}
'
myCmd
.
run
(
cmd
,
reportNonZero
=
False
)
...
...
@@ -838,8 +840,7 @@ class Containerize():
mySSH
.
command
(
'cd '
+
lSourcePath
+
'/'
+
self
.
yamlPath
[
self
.
eNB_instance
],
'\$'
,
5
)
mySSH
.
command
(
'cp docker-compose.y*ml ci-docker-compose.yml'
,
'\$'
,
5
)
imagesList
=
[
'oai-enb'
,
'oai-gnb'
,
'oai-nr-cuup'
,
'oai-gnb-aw2s'
,
'oai-nr-ue'
]
for
image
in
imagesList
:
for
image
in
IMAGES
:
imageTag
=
ImageTagToUse
(
image
,
self
.
ranCommitID
,
self
.
ranBranch
,
self
.
ranAllowMerge
)
mySSH
.
command
(
f'sed -i -e "s#image:
{
image
}
:latest#image: oai-ci/
{
imageTag
}
#" ci-docker-compose.yml'
,
'\$'
,
2
)
localMmeIpAddr
=
EPC
.
MmeIPAddress
...
...
@@ -1005,7 +1006,7 @@ class Containerize():
HTML
.
htmleNBFailureMsg
=
'Could not copy logfile to analyze it!'
HTML
.
CreateHtmlTestRow
(
'N/A'
,
'KO'
,
CONST
.
ENB_PROCESS_NOLOGFILE_TO_ANALYZE
)
self
.
exitStatus
=
1
# use function for UE log analysis, when oai-nr-ue container is used
# use function for UE log analysis, when oai-nr-ue container is used
elif
'oai-nr-ue'
in
services
:
self
.
exitStatus
==
0
logging
.
debug
(
'
\u001B
[1m Analyzing UE logfile '
+
filename
+
'
\u001B
[0m'
)
...
...
@@ -1198,8 +1199,7 @@ class Containerize():
myCmd
=
cls_cmd
.
LocalCmd
(
d
=
self
.
yamlPath
[
0
])
cmd
=
'cp docker-compose.y*ml docker-compose-ci.yml'
myCmd
.
run
(
cmd
,
silent
=
self
.
displayedNewTags
)
imageNames
=
[
'oai-enb'
,
'oai-gnb'
,
'oai-lte-ue'
,
'oai-nr-ue'
,
'oai-lte-ru'
,
'oai-nr-cuup'
]
for
image
in
imageNames
:
for
image
in
IMAGES
:
tagToUse
=
ImageTagToUse
(
image
,
self
.
ranCommitID
,
self
.
ranBranch
,
self
.
ranAllowMerge
)
cmd
=
f'sed -i -e "s@oaisoftwarealliance/
{
image
}
:develop@oai-ci/
{
tagToUse
}
@" docker-compose-ci.yml'
myCmd
.
run
(
cmd
,
silent
=
self
.
displayedNewTags
)
...
...
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