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
4f466223
Commit
4f466223
authored
Oct 14, 2022
by
Raphael Defosseux
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix(ci): forgot to add HTML rows to test-report
Signed-off-by:
Raphael Defosseux
<
raphael.defosseux@eurecom.fr
>
parent
6da8869e
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
3 deletions
+18
-3
ci-scripts/cls_containerize.py
ci-scripts/cls_containerize.py
+15
-0
ci-scripts/main.py
ci-scripts/main.py
+3
-3
No files found.
ci-scripts/cls_containerize.py
View file @
4f466223
...
@@ -652,6 +652,8 @@ class Containerize():
...
@@ -652,6 +652,8 @@ class Containerize():
mySSH
.
command
(
'echo oaicicd | docker login --password-stdin -u oaicicd porcepix.sboai.cs.eurecom.fr'
,
'\$'
,
5
)
mySSH
.
command
(
'echo oaicicd | docker login --password-stdin -u oaicicd porcepix.sboai.cs.eurecom.fr'
,
'\$'
,
5
)
if
re
.
search
(
'Login Succeeded'
,
mySSH
.
getBefore
())
is
None
:
if
re
.
search
(
'Login Succeeded'
,
mySSH
.
getBefore
())
is
None
:
logging
.
error
(
'Could not log into local registry'
)
logging
.
error
(
'Could not log into local registry'
)
mySSH
.
close
()
HTML
.
CreateHtmlTestRow
(
'Could not log into local registry'
,
'KO'
,
CONST
.
ALL_PROCESSES_OK
)
return
False
return
False
orgTag
=
'develop'
orgTag
=
'develop'
...
@@ -665,15 +667,20 @@ class Containerize():
...
@@ -665,15 +667,20 @@ class Containerize():
if
re
.
search
(
': digest:'
,
mySSH
.
getBefore
())
is
None
:
if
re
.
search
(
': digest:'
,
mySSH
.
getBefore
())
is
None
:
logging
.
debug
(
mySSH
.
getBefore
())
logging
.
debug
(
mySSH
.
getBefore
())
logging
.
error
(
f'Could not push
{
image
}
to local registry :
{
tagToUse
}
'
)
logging
.
error
(
f'Could not push
{
image
}
to local registry :
{
tagToUse
}
'
)
mySSH
.
close
()
HTML
.
CreateHtmlTestRow
(
f'Could not push
{
image
}
to local registry :
{
tagToUse
}
'
,
'KO'
,
CONST
.
ALL_PROCESSES_OK
)
return
False
return
False
mySSH
.
command
(
f'docker rmi
{
tagToUse
}
'
,
'\$'
,
5
)
mySSH
.
command
(
f'docker rmi
{
tagToUse
}
'
,
'\$'
,
5
)
mySSH
.
command
(
'docker logout porcepix.sboai.cs.eurecom.fr'
,
'\$'
,
5
)
mySSH
.
command
(
'docker logout porcepix.sboai.cs.eurecom.fr'
,
'\$'
,
5
)
if
re
.
search
(
'Removing login credentials'
,
mySSH
.
getBefore
())
is
None
:
if
re
.
search
(
'Removing login credentials'
,
mySSH
.
getBefore
())
is
None
:
logging
.
error
(
'Could not log off from local registry'
)
logging
.
error
(
'Could not log off from local registry'
)
mySSH
.
close
()
HTML
.
CreateHtmlTestRow
(
'Could not log off from local registry'
,
'KO'
,
CONST
.
ALL_PROCESSES_OK
)
return
False
return
False
mySSH
.
close
()
mySSH
.
close
()
HTML
.
CreateHtmlTestRow
(
'N/A'
,
'OK'
,
CONST
.
ALL_PROCESSES_OK
)
return
True
return
True
def
Pull_Image_from_Local_Registry
(
self
,
HTML
):
def
Pull_Image_from_Local_Registry
(
self
,
HTML
):
...
@@ -702,6 +709,8 @@ class Containerize():
...
@@ -702,6 +709,8 @@ class Containerize():
mySSH
.
command
(
'echo oaicicd | docker login --password-stdin -u oaicicd porcepix.sboai.cs.eurecom.fr'
,
'\$'
,
5
)
mySSH
.
command
(
'echo oaicicd | docker login --password-stdin -u oaicicd porcepix.sboai.cs.eurecom.fr'
,
'\$'
,
5
)
if
re
.
search
(
'Login Succeeded'
,
mySSH
.
getBefore
())
is
None
:
if
re
.
search
(
'Login Succeeded'
,
mySSH
.
getBefore
())
is
None
:
logging
.
error
(
'Could not log into local registry'
)
logging
.
error
(
'Could not log into local registry'
)
mySSH
.
close
()
HTML
.
CreateHtmlTestRow
(
'Could not log into local registry'
,
'KO'
,
CONST
.
ALL_PROCESSES_OK
)
return
False
return
False
orgTag
=
'develop'
orgTag
=
'develop'
...
@@ -714,14 +723,19 @@ class Containerize():
...
@@ -714,14 +723,19 @@ class Containerize():
if
re
.
search
(
'Status: Downloaded newer image for |Status: Image is up to date for'
,
mySSH
.
getBefore
())
is
None
:
if
re
.
search
(
'Status: Downloaded newer image for |Status: Image is up to date for'
,
mySSH
.
getBefore
())
is
None
:
logging
.
debug
(
mySSH
.
getBefore
())
logging
.
debug
(
mySSH
.
getBefore
())
logging
.
error
(
f'Could not pull
{
image
}
from local registry :
{
tagToUse
}
'
)
logging
.
error
(
f'Could not pull
{
image
}
from local registry :
{
tagToUse
}
'
)
mySSH
.
close
()
HTML
.
CreateHtmlTestRow
(
f'Could not pull
{
image
}
from local registry :
{
tagToUse
}
'
,
'KO'
,
CONST
.
ALL_PROCESSES_OK
)
return
False
return
False
mySSH
.
command
(
'docker logout porcepix.sboai.cs.eurecom.fr'
,
'\$'
,
5
)
mySSH
.
command
(
'docker logout porcepix.sboai.cs.eurecom.fr'
,
'\$'
,
5
)
if
re
.
search
(
'Removing login credentials'
,
mySSH
.
getBefore
())
is
None
:
if
re
.
search
(
'Removing login credentials'
,
mySSH
.
getBefore
())
is
None
:
logging
.
error
(
'Could not log off from local registry'
)
logging
.
error
(
'Could not log off from local registry'
)
mySSH
.
close
()
HTML
.
CreateHtmlTestRow
(
'Could not log off from local registry'
,
'KO'
,
CONST
.
ALL_PROCESSES_OK
)
return
False
return
False
mySSH
.
close
()
mySSH
.
close
()
HTML
.
CreateHtmlTestRow
(
'N/A'
,
'OK'
,
CONST
.
ALL_PROCESSES_OK
)
return
True
return
True
def
Clean_Test_Server_Images
(
self
,
HTML
):
def
Clean_Test_Server_Images
(
self
,
HTML
):
...
@@ -757,6 +771,7 @@ class Containerize():
...
@@ -757,6 +771,7 @@ class Containerize():
mySSH
.
command
(
f'docker rmi
{
tagToUse
}
|| true'
,
'\$'
,
5
)
mySSH
.
command
(
f'docker rmi
{
tagToUse
}
|| true'
,
'\$'
,
5
)
mySSH
.
close
()
mySSH
.
close
()
HTML
.
CreateHtmlTestRow
(
'N/A'
,
'OK'
,
CONST
.
ALL_PROCESSES_OK
)
return
True
return
True
def
DeployObject
(
self
,
HTML
,
EPC
):
def
DeployObject
(
self
,
HTML
,
EPC
):
...
...
ci-scripts/main.py
View file @
4f466223
...
@@ -1015,14 +1015,14 @@ elif re.match('^TesteNB$', mode, re.IGNORECASE) or re.match('^TestUE$', mode, re
...
@@ -1015,14 +1015,14 @@ elif re.match('^TesteNB$', mode, re.IGNORECASE) or re.match('^TestUE$', mode, re
HTML
.
testStabilityPointReached
=
True
HTML
.
testStabilityPointReached
=
True
CiTestObj
.
FailReportCnt
+=
1
CiTestObj
.
FailReportCnt
+=
1
if
CiTestObj
.
FailReportCnt
==
CiTestObj
.
repeatCounts
[
0
]
and
RAN
.
prematureExit
:
if
CiTestObj
.
FailReportCnt
==
CiTestObj
.
repeatCounts
[
0
]
and
RAN
.
prematureExit
:
logging
.
error
(
'
Scenario failed '
+
str
(
CiTestObj
.
FailReportCnt
)
+
' time(s)
'
)
logging
.
error
(
'
\u001B
[1;37;41mScenario failed '
+
str
(
CiTestObj
.
FailReportCnt
)
+
' time(s)
\u001B
[0m
'
)
HTML
.
CreateHtmlTabFooter
(
False
)
HTML
.
CreateHtmlTabFooter
(
False
)
if
CiTestObj
.
testUnstable
and
(
CiTestObj
.
testStabilityPointReached
or
CiTestObj
.
testMinStableId
==
'999999'
):
if
CiTestObj
.
testUnstable
and
(
CiTestObj
.
testStabilityPointReached
or
CiTestObj
.
testMinStableId
==
'999999'
):
logging
.
warning
(
'
Scenario has reached minimal stability point -- Not a Failure
'
)
logging
.
warning
(
'
\u001B
[1;30;43mScenario has reached minimal stability point -- Not a Failure
\u001B
[0m
'
)
else
:
else
:
sys
.
exit
(
'Failed Scenario'
)
sys
.
exit
(
'Failed Scenario'
)
else
:
else
:
logging
.
info
(
'
Scenario passed after '
+
str
(
CiTestObj
.
FailReportCnt
)
+
' time(s)
'
)
logging
.
info
(
'
\u001B
[1;37;42mScenario passed after '
+
str
(
CiTestObj
.
FailReportCnt
)
+
' time(s)
\u001B
[0m
'
)
HTML
.
CreateHtmlTabFooter
(
True
)
HTML
.
CreateHtmlTabFooter
(
True
)
elif
re
.
match
(
'^LoadParams$'
,
mode
,
re
.
IGNORECASE
):
elif
re
.
match
(
'^LoadParams$'
,
mode
,
re
.
IGNORECASE
):
pass
pass
...
...
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