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
Show 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
...
@@ -53,10 +53,13 @@ import sshconnection as SSH
import
helpreadme
as
HELP
import
helpreadme
as
HELP
import
constants
as
CONST
import
constants
as
CONST
import
cls_oaicitest
import
cls_oaicitest
#-----------------------------------------------------------
#-----------------------------------------------------------
# Helper functions used here and in other classes
# Helper functions used here and in other classes
# (e.g., cls_cluster.py)
# (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
):
def
CreateWorkspace
(
sshSession
,
sourcePath
,
ranRepository
,
ranCommitID
,
ranTargetBranch
,
ranAllowMerge
):
if
ranCommitID
==
''
:
if
ranCommitID
==
''
:
logging
.
error
(
'need ranCommitID in CreateWorkspace()'
)
logging
.
error
(
'need ranCommitID in CreateWorkspace()'
)
...
@@ -800,8 +803,7 @@ class Containerize():
...
@@ -800,8 +803,7 @@ class Containerize():
logging
.
debug
(
'Removing test images locally'
)
logging
.
debug
(
'Removing test images locally'
)
myCmd
=
cls_cmd
.
LocalCmd
()
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
IMAGES
:
for
image
in
imageNames
:
imageTag
=
ImageTagToUse
(
image
,
self
.
ranCommitID
,
self
.
ranBranch
,
self
.
ranAllowMerge
)
imageTag
=
ImageTagToUse
(
image
,
self
.
ranCommitID
,
self
.
ranBranch
,
self
.
ranAllowMerge
)
cmd
=
f'docker rmi oai-ci/
{
imageTag
}
'
cmd
=
f'docker rmi oai-ci/
{
imageTag
}
'
myCmd
.
run
(
cmd
,
reportNonZero
=
False
)
myCmd
.
run
(
cmd
,
reportNonZero
=
False
)
...
@@ -838,8 +840,7 @@ class Containerize():
...
@@ -838,8 +840,7 @@ class Containerize():
mySSH
.
command
(
'cd '
+
lSourcePath
+
'/'
+
self
.
yamlPath
[
self
.
eNB_instance
],
'\$'
,
5
)
mySSH
.
command
(
'cd '
+
lSourcePath
+
'/'
+
self
.
yamlPath
[
self
.
eNB_instance
],
'\$'
,
5
)
mySSH
.
command
(
'cp docker-compose.y*ml ci-docker-compose.yml'
,
'\$'
,
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
IMAGES
:
for
image
in
imagesList
:
imageTag
=
ImageTagToUse
(
image
,
self
.
ranCommitID
,
self
.
ranBranch
,
self
.
ranAllowMerge
)
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
)
mySSH
.
command
(
f'sed -i -e "s#image:
{
image
}
:latest#image: oai-ci/
{
imageTag
}
#" ci-docker-compose.yml'
,
'\$'
,
2
)
localMmeIpAddr
=
EPC
.
MmeIPAddress
localMmeIpAddr
=
EPC
.
MmeIPAddress
...
@@ -1198,8 +1199,7 @@ class Containerize():
...
@@ -1198,8 +1199,7 @@ class Containerize():
myCmd
=
cls_cmd
.
LocalCmd
(
d
=
self
.
yamlPath
[
0
])
myCmd
=
cls_cmd
.
LocalCmd
(
d
=
self
.
yamlPath
[
0
])
cmd
=
'cp docker-compose.y*ml docker-compose-ci.yml'
cmd
=
'cp docker-compose.y*ml docker-compose-ci.yml'
myCmd
.
run
(
cmd
,
silent
=
self
.
displayedNewTags
)
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
IMAGES
:
for
image
in
imageNames
:
tagToUse
=
ImageTagToUse
(
image
,
self
.
ranCommitID
,
self
.
ranBranch
,
self
.
ranAllowMerge
)
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'
cmd
=
f'sed -i -e "s@oaisoftwarealliance/
{
image
}
:develop@oai-ci/
{
tagToUse
}
@" docker-compose-ci.yml'
myCmd
.
run
(
cmd
,
silent
=
self
.
displayedNewTags
)
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