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
zzha zzha
OpenXG-RAN
Commits
19ffb7be
Commit
19ffb7be
authored
Feb 03, 2023
by
Raphael Defosseux
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix(ci): proxy repo has no develop branch
Signed-off-by:
Raphael Defosseux
<
raphael.defosseux@eurecom.fr
>
parent
f516d7ab
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
1 deletion
+8
-1
ci-scripts/cls_containerize.py
ci-scripts/cls_containerize.py
+8
-1
No files found.
ci-scripts/cls_containerize.py
View file @
19ffb7be
...
@@ -65,7 +65,8 @@ def CreateWorkspace(sshSession, sourcePath, ranRepository, ranCommitID, ranTarge
...
@@ -65,7 +65,8 @@ def CreateWorkspace(sshSession, sourcePath, ranRepository, ranCommitID, ranTarge
sshSession
.
command
(
'mkdir -p '
+
sourcePath
,
'\$'
,
5
)
sshSession
.
command
(
'mkdir -p '
+
sourcePath
,
'\$'
,
5
)
sshSession
.
command
(
'cd '
+
sourcePath
,
'\$'
,
5
)
sshSession
.
command
(
'cd '
+
sourcePath
,
'\$'
,
5
)
# Recent version of git (>2.20?) should handle missing .git extension # without problems
# Recent version of git (>2.20?) should handle missing .git extension # without problems
sshSession
.
command
(
f'git clone --filter=blob:none -n -b develop
{
ranRepository
}
.'
,
'\$'
,
60
)
baseBranch
=
re
.
sub
(
'origin/'
,
''
,
ranTargetBranch
)
sshSession
.
command
(
f'git clone --filter=blob:none -n -b
{
baseBranch
}
{
ranRepository
}
.'
,
'\$'
,
60
)
if
sshSession
.
getBefore
().
count
(
'error'
)
>
0
or
sshSession
.
getBefore
().
count
(
'error'
)
>
0
:
if
sshSession
.
getBefore
().
count
(
'error'
)
>
0
or
sshSession
.
getBefore
().
count
(
'error'
)
>
0
:
sys
.
exit
(
'error during clone'
)
sys
.
exit
(
'error during clone'
)
sshSession
.
command
(
'git config user.email "jenkins@openairinterface.org"'
,
'\$'
,
5
)
sshSession
.
command
(
'git config user.email "jenkins@openairinterface.org"'
,
'\$'
,
5
)
...
@@ -550,14 +551,17 @@ class Containerize():
...
@@ -550,14 +551,17 @@ class Containerize():
oldRanCommidID
=
self
.
ranCommitID
oldRanCommidID
=
self
.
ranCommitID
oldRanRepository
=
self
.
ranRepository
oldRanRepository
=
self
.
ranRepository
oldRanAllowMerge
=
self
.
ranAllowMerge
oldRanAllowMerge
=
self
.
ranAllowMerge
oldRanTargetBranch
=
self
.
ranTargetBranch
self
.
ranCommitID
=
self
.
proxyCommit
self
.
ranCommitID
=
self
.
proxyCommit
self
.
ranRepository
=
'https://github.com/EpiSci/oai-lte-5g-multi-ue-proxy.git'
self
.
ranRepository
=
'https://github.com/EpiSci/oai-lte-5g-multi-ue-proxy.git'
self
.
ranAllowMerge
=
False
self
.
ranAllowMerge
=
False
self
.
ranTargetBranch
=
'master'
CreateWorkspace
(
mySSH
,
lSourcePath
,
self
.
ranRepository
,
self
.
ranCommitID
,
self
.
ranTargetBranch
,
self
.
ranAllowMerge
)
CreateWorkspace
(
mySSH
,
lSourcePath
,
self
.
ranRepository
,
self
.
ranCommitID
,
self
.
ranTargetBranch
,
self
.
ranAllowMerge
)
# to prevent accidentally overwriting data that might be used later
# to prevent accidentally overwriting data that might be used later
self
.
ranCommitID
=
oldRanCommidID
self
.
ranCommitID
=
oldRanCommidID
self
.
ranRepository
=
oldRanRepository
self
.
ranRepository
=
oldRanRepository
self
.
ranAllowMerge
=
oldRanAllowMerge
self
.
ranAllowMerge
=
oldRanAllowMerge
self
.
ranTargetBranch
=
oldRanTargetBranch
# Let's remove any previous run artifacts if still there
# Let's remove any previous run artifacts if still there
mySSH
.
command
(
self
.
cli
+
' image prune --force'
,
'\$'
,
30
)
mySSH
.
command
(
self
.
cli
+
' image prune --force'
,
'\$'
,
30
)
...
@@ -574,6 +578,7 @@ class Containerize():
...
@@ -574,6 +578,7 @@ class Containerize():
# Note: at this point, OAI images are flattened, but we cannot do this
# Note: at this point, OAI images are flattened, but we cannot do this
# here, as the flatten script is not in the proxy repo
# here, as the flatten script is not in the proxy repo
mySSH
.
command
(
self
.
cli
+
' image inspect --format=
\'
Size = {{.Size}} bytes
\'
proxy:'
+
tag
,
'\$'
,
5
)
mySSH
.
command
(
self
.
cli
+
' image inspect --format=
\'
Size = {{.Size}} bytes
\'
proxy:'
+
tag
,
'\$'
,
5
)
mySSH
.
command
(
self
.
cli
+
' image prune --force || true'
,
'\$'
,
15
)
if
mySSH
.
getBefore
().
count
(
'o such image'
)
!=
0
:
if
mySSH
.
getBefore
().
count
(
'o such image'
)
!=
0
:
logging
.
error
(
'
\u001B
[1m Build of L2sim proxy failed
\u001B
[0m'
)
logging
.
error
(
'
\u001B
[1m Build of L2sim proxy failed
\u001B
[0m'
)
mySSH
.
close
()
mySSH
.
close
()
...
@@ -1098,6 +1103,8 @@ class Containerize():
...
@@ -1098,6 +1103,8 @@ class Containerize():
healthy
+=
1
healthy
+=
1
if
re
.
search
(
'rfsim4g-db-init.*Exit 0'
,
state
)
is
not
None
or
re
.
search
(
'rfsim4g-db-init.*Exited \(0\)'
,
state
)
is
not
None
:
if
re
.
search
(
'rfsim4g-db-init.*Exit 0'
,
state
)
is
not
None
or
re
.
search
(
'rfsim4g-db-init.*Exited \(0\)'
,
state
)
is
not
None
:
myCmd
.
run
(
'docker rm -f rfsim4g-db-init'
,
timeout
=
30
,
silent
=
True
,
reportNonZero
=
False
)
myCmd
.
run
(
'docker rm -f rfsim4g-db-init'
,
timeout
=
30
,
silent
=
True
,
reportNonZero
=
False
)
if
re
.
search
(
'l2sim4g-db-init.*Exit 0'
,
state
)
is
not
None
or
re
.
search
(
'l2sim4g-db-init.*Exited \(0\)'
,
state
)
is
not
None
:
myCmd
.
run
(
'docker rm -f l2sim4g-db-init'
,
timeout
=
30
,
silent
=
True
,
reportNonZero
=
False
)
if
re
.
search
(
'Restarting'
,
state
)
is
None
:
if
re
.
search
(
'Restarting'
,
state
)
is
None
:
containerStatus
.
append
(
state
)
containerStatus
.
append
(
state
)
else
:
else
:
...
...
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