Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
openairinterface5G
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
oai
openairinterface5G
Commits
c1b448cd
Commit
c1b448cd
authored
2 years ago
by
Robert Schmidt
Browse files
Options
Downloads
Patches
Plain Diff
Handle errors in Copy_Image_to_Test_Server()
parent
3a0a14cf
No related branches found
Branches containing commit
No related tags found
Tags containing commit
3 merge requests
!1757
Draft: Use pMAX value in configuration file, instead of hardcoded '23' in asn1_msg.c
,
!1682
integration_2022_wk35
,
!1666
gzip optim, links for size
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
ci-scripts/cls_containerize.py
+20
-1
20 additions, 1 deletion
ci-scripts/cls_containerize.py
ci-scripts/main.py
+3
-1
3 additions, 1 deletion
ci-scripts/main.py
with
23 additions
and
2 deletions
ci-scripts/cls_containerize.py
+
20
−
1
View file @
c1b448cd
...
...
@@ -580,8 +580,16 @@ class Containerize():
lPassWord
=
self
.
eNB2Password
lSsh
.
open
(
lIpAddr
,
lUserName
,
lPassWord
)
lSsh
.
command
(
'
docker save
'
+
self
.
imageToCopy
+
'
:
'
+
imageTag
+
'
| gzip --fast >
'
+
self
.
imageToCopy
+
'
-
'
+
imageTag
+
'
.tar.gz
'
,
'
\$
'
,
60
)
lSsh
.
copyin
(
lIpAddr
,
lUserName
,
lPassWord
,
'
~/
'
+
self
.
imageToCopy
+
'
-
'
+
imageTag
+
'
.tar.gz
'
,
'
.
'
)
ret
=
lSsh
.
copyin
(
lIpAddr
,
lUserName
,
lPassWord
,
'
~/
'
+
self
.
imageToCopy
+
'
-
'
+
imageTag
+
'
.tar.gz
'
,
'
.
'
)
if
ret
!=
0
:
HTML
.
CreateHtmlTestRow
(
'
N/A
'
,
'
KO
'
,
CONST
.
ALL_PROCESSES_OK
)
self
.
exitStatus
=
1
return
False
lSsh
.
command
(
'
rm
'
+
self
.
imageToCopy
+
'
-
'
+
imageTag
+
'
.tar.gz
'
,
'
\$
'
,
60
)
if
lSsh
.
getBefore
().
count
(
'
cannot remove
'
):
HTML
.
CreateHtmlTestRow
(
'
file not created by docker save
'
,
'
KO
'
,
CONST
.
ALL_PROCESSES_OK
)
self
.
exitStatus
=
1
return
False
lSsh
.
close
()
# Going to the Test Server
...
...
@@ -599,15 +607,26 @@ class Containerize():
lPassWord
=
self
.
eNB2Password
lSsh
.
open
(
lIpAddr
,
lUserName
,
lPassWord
)
lSsh
.
copyout
(
lIpAddr
,
lUserName
,
lPassWord
,
'
./
'
+
self
.
imageToCopy
+
'
-
'
+
imageTag
+
'
.tar.gz
'
,
'
~
'
)
# copyout has no return code and will quit if something fails
lSsh
.
command
(
'
docker rmi
'
+
self
.
imageToCopy
+
'
:
'
+
imageTag
,
'
\$
'
,
10
)
lSsh
.
command
(
'
docker load <
'
+
self
.
imageToCopy
+
'
-
'
+
imageTag
+
'
.tar.gz
'
,
'
\$
'
,
60
)
if
lSsh
.
getBefore
().
count
(
'
o such file
'
)
or
lSsh
.
getBefore
().
count
(
'
invalid tar header
'
):
logging
.
debug
(
lSsh
.
getBefore
())
HTML
.
CreateHtmlTestRow
(
'
problem during docker load
'
,
'
KO
'
,
CONST
.
ALL_PROCESSES_OK
)
self
.
exitStatus
=
1
return
False
lSsh
.
command
(
'
rm
'
+
self
.
imageToCopy
+
'
-
'
+
imageTag
+
'
.tar.gz
'
,
'
\$
'
,
60
)
if
lSsh
.
getBefore
().
count
(
'
cannot remove
'
):
HTML
.
CreateHtmlTestRow
(
'
file not copied during scp?
'
,
'
KO
'
,
CONST
.
ALL_PROCESSES_OK
)
self
.
exitStatus
=
1
return
False
lSsh
.
close
()
if
os
.
path
.
isfile
(
'
./
'
+
self
.
imageToCopy
+
'
-
'
+
imageTag
+
'
.tar.gz
'
):
os
.
remove
(
'
./
'
+
self
.
imageToCopy
+
'
-
'
+
imageTag
+
'
.tar.gz
'
)
HTML
.
CreateHtmlTestRow
(
'
N/A
'
,
'
OK
'
,
CONST
.
ALL_PROCESSES_OK
)
return
True
def
DeployObject
(
self
,
HTML
,
EPC
):
if
self
.
eNB_serverId
[
self
.
eNB_instance
]
==
'
0
'
:
...
...
This diff is collapsed.
Click to expand it.
ci-scripts/main.py
+
3
−
1
View file @
c1b448cd
...
...
@@ -921,7 +921,9 @@ elif re.match('^TesteNB$', mode, re.IGNORECASE) or re.match('^TestUE$', mode, re
elif
action
==
'
Build_Proxy
'
:
CONTAINERS
.
BuildProxy
(
HTML
)
elif
action
==
'
Copy_Image_to_Test
'
:
CONTAINERS
.
Copy_Image_to_Test_Server
(
HTML
)
success
=
CONTAINERS
.
Copy_Image_to_Test_Server
(
HTML
)
if
not
success
:
RAN
.
prematureExit
=
True
elif
action
==
'
Deploy_Object
'
:
CONTAINERS
.
DeployObject
(
HTML
,
EPC
)
if
CONTAINERS
.
exitStatus
==
1
:
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment