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
常顺宇
OpenXG-RAN
Commits
3a3a3efc
Commit
3a3a3efc
authored
Apr 12, 2021
by
Mohammed Ismail
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
CI: missing parameters added
Signed-off-by:
Mohammed Ismail
<
mohammed.ismail@openairinterface.org
>
parent
52442573
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
2 deletions
+9
-2
ci-scripts/cls_physim1.py
ci-scripts/cls_physim1.py
+9
-2
No files found.
ci-scripts/cls_physim1.py
View file @
3a3a3efc
...
...
@@ -32,9 +32,12 @@
# Import
#-----------------------------------------------------------
import
logging
import
sshconnection
import
sshconnection
as
SSH
import
html
import
os
import
re
import
time
import
sys
import
constants
as
CONST
import
helpreadme
as
HELP
...
...
@@ -98,6 +101,7 @@ class PhySim:
mySSH
.
command
(
"sudo podman image inspect --format='Size = {{.Size}} bytes' oai-physim:ci-temp"
,
'\$'
,
60
)
if
mySSH
.
getBefore
().
count
(
'no such image'
)
!=
0
:
logging
.
error
(
'
\u001B
[1m No such image oai-physim
\u001B
[0m'
)
sys
.
exit
(
-
1
)
else
:
result
=
re
.
search
(
'Size *= *(?P<size>[0-9\-]+) *bytes'
,
mySSH
.
getBefore
())
if
result
is
not
None
:
...
...
@@ -117,13 +121,15 @@ class PhySim:
# logging to OC cluster
mySSH
.
command
(
'oc login -u {self.OCUserName} -p {self.OCPassword}'
,
'\$'
,
6
)
if
mySSH
.
getBefore
().
count
(
'Login successful'
)
==
0
:
if
mySSH
.
getBefore
().
count
(
'Login successful
.
'
)
==
0
:
logging
.
error
(
'
\u001B
[1m OC Cluster Login Failed
\u001B
[0m'
)
sys
.
exit
(
-
1
)
else
:
logging
.
debug
(
'
\u001B
[1m Login to OC Cluster Successfully
\u001B
[0m'
)
mySSH
.
command
(
'oc project {self.OCWorkspace}'
,
'\$'
,
6
)
if
(
mySSH
.
getBefore
().
count
(
'Already on project "{self.OCWorkspace}"'
))
==
0
or
(
mySSH
.
getBefore
().
count
(
'Now using project "{self.OCWorkspace}"'
))
==
0
:
logging
.
error
(
'
\u001B
[1m Unable to access OC project {self.OCWorkspace}
\u001B
[0m'
)
sys
.
exit
(
-
1
)
else
:
logging
.
debug
(
'
\u001B
[1m Now using project {self.OCWorkspace}
\u001B
[0m'
)
...
...
@@ -131,6 +137,7 @@ class PhySim:
mySSH
.
command
(
'helm install physim ./charts/physims/'
,
'\$'
,
6
)
if
mySSH
.
getBefore
().
count
(
'STATUS: deployed'
)
==
0
:
logging
.
error
(
'
\u001B
[1m Deploying PhySim Failed using helm chart
\u001B
[0m'
)
sys
.
exit
(
-
1
)
else
:
logging
.
debug
(
'
\u001B
[1m Deployed PhySim Successfully using helm chart
\u001B
[0m'
)
isRunning
=
False
...
...
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