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
wangwenhui
OpenXG-RAN
Commits
fc17d335
Commit
fc17d335
authored
Jan 04, 2021
by
Mohammed Ismail
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
updated
parent
dcdd8bd1
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
8 deletions
+9
-8
ci-scripts/cls_containerize.py
ci-scripts/cls_containerize.py
+9
-8
No files found.
ci-scripts/cls_containerize.py
View file @
fc17d335
...
@@ -115,17 +115,18 @@ class Containerize():
...
@@ -115,17 +115,18 @@ class Containerize():
mySSH
.
open
(
lIpAddr
,
lUserName
,
lPassWord
)
mySSH
.
open
(
lIpAddr
,
lUserName
,
lPassWord
)
# Checking the hostname to get adapted on cli and dockerfileprefixes
# Checking the hostname to get adapted on cli and dockerfileprefixes
mySSH
.
command
(
'hostname'
,
'\$'
,
5
)
mySSH
.
command
(
'hostnamectl'
,
'\$'
,
5
)
self
.
host
=
re
.
search
(
'obelix|asterix'
,
mySSH
.
getBefore
())
result
=
re
.
search
(
'Ubuntu|Red Hat'
,
mySSH
.
getBefore
())
if
self
.
host
==
'obelix'
:
self
.
host
=
result
.
group
(
0
)
if
self
.
host
==
'Ubuntu'
:
self
.
cli
=
'docker'
self
.
cli
=
'docker'
self
.
dockerfileprefix
=
'.ubuntu18'
self
.
dockerfileprefix
=
'.ubuntu18'
elif
self
.
host
==
'
asterix
'
:
elif
self
.
host
==
'
Red Hat
'
:
self
.
cli
=
'sudo podman'
self
.
cli
=
'sudo podman'
self
.
dockerfileprefix
=
'.rhel8.2'
self
.
dockerfileprefix
=
'.rhel8.2'
imageNames
=
[]
imageNames
=
[]
if
self
.
host
==
'
obelix
'
:
if
self
.
host
==
'
Ubuntu
'
:
result
=
re
.
search
(
'eNB'
,
self
.
imageKind
)
result
=
re
.
search
(
'eNB'
,
self
.
imageKind
)
# Creating a tupple with the imageName and the DockerFile prefix pattern on obelix
# Creating a tupple with the imageName and the DockerFile prefix pattern on obelix
if
result
is
not
None
:
if
result
is
not
None
:
...
@@ -143,7 +144,7 @@ class Containerize():
...
@@ -143,7 +144,7 @@ class Containerize():
imageNames
.
append
((
'oai-nr-ue'
,
'nrUE'
))
imageNames
.
append
((
'oai-nr-ue'
,
'nrUE'
))
if
len
(
imageNames
)
==
0
:
if
len
(
imageNames
)
==
0
:
imageNames
.
append
((
'oai-enb'
,
'eNB'
))
imageNames
.
append
((
'oai-enb'
,
'eNB'
))
elif
self
.
host
==
'
asterix
'
:
elif
self
.
host
==
'
Red Hat
'
:
result
=
re
.
search
(
'eNB'
,
self
.
imageKind
)
result
=
re
.
search
(
'eNB'
,
self
.
imageKind
)
# Creating a tupple with the imageName and the DockerFile prefix pattern on asterix
# Creating a tupple with the imageName and the DockerFile prefix pattern on asterix
if
result
is
not
None
:
if
result
is
not
None
:
...
@@ -211,9 +212,9 @@ class Containerize():
...
@@ -211,9 +212,9 @@ class Containerize():
# Build the shared image
# Build the shared image
sharedimage
=
''
sharedimage
=
''
if
self
.
host
==
'
obelix
'
:
if
self
.
host
==
'
Ubuntu
'
:
sharedimage
=
'ran-build'
sharedimage
=
'ran-build'
elif
self
.
host
==
'
asterix
'
:
elif
self
.
host
==
'
Red Hat
'
:
sharedimage
=
'localhost/ran-build'
sharedimage
=
'localhost/ran-build'
mySSH
.
command
(
self
.
cli
+
' build --target '
+
sharedimage
+
' --tag '
+
sharedimage
+
':'
+
imageTag
+
' --file docker/Dockerfile.ran'
+
self
.
dockerfileprefix
+
' --build-arg NEEDED_GIT_PROXY="http://proxy.eurecom.fr:8080" . > cmake_targets/log/ran-build.log 2>&1'
,
'\$'
,
800
)
mySSH
.
command
(
self
.
cli
+
' build --target '
+
sharedimage
+
' --tag '
+
sharedimage
+
':'
+
imageTag
+
' --file docker/Dockerfile.ran'
+
self
.
dockerfileprefix
+
' --build-arg NEEDED_GIT_PROXY="http://proxy.eurecom.fr:8080" . > cmake_targets/log/ran-build.log 2>&1'
,
'\$'
,
800
)
# Build the target image(s)
# Build the target image(s)
...
...
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