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
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
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
OpenXG-RAN
Commits
eb15d733
Commit
eb15d733
authored
Sep 15, 2022
by
Robert Schmidt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove sudo commands from cluster-related CI scripts
parent
61e65959
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
14 deletions
+2
-14
ci-scripts/cls_cluster.py
ci-scripts/cls_cluster.py
+1
-13
ci-scripts/cls_containerize.py
ci-scripts/cls_containerize.py
+1
-1
No files found.
ci-scripts/cls_cluster.py
View file @
eb15d733
...
...
@@ -141,18 +141,6 @@ class Cluster:
def
_retag_image_statement
(
self
,
sshSession
,
oldImage
,
newImage
,
newTag
,
filename
):
sshSession
.
command
(
f'sed -i -e "s#
{
oldImage
}
:latest#
{
newImage
}
:
{
newTag
}
#"
{
filename
}
'
,
'\$'
,
5
)
def
_pull_image
(
self
,
sshSession
,
image
,
tag
):
sshSession
.
command
(
f'oc whoami -t | sudo podman login -u oaicicd --password-stdin https://
{
self
.
OCRegistry
}
--tls-verify=false'
,
'\$'
,
5
,
silent
=
True
)
if
sshSession
.
getBefore
().
count
(
'Login Succeeded!'
)
==
0
:
return
None
imageName
=
f'
{
self
.
OCRegistry
}{
self
.
OCProjectName
}
/
{
image
}
:
{
tag
}
'
sshSession
.
command
(
f'sudo podman pull
{
imageName
}
--tls-verify=false'
,
'\$'
,
300
)
pullResult
=
sshSession
.
getBefore
()
sshSession
.
command
(
f'sudo podman logout https://
{
self
.
OCRegistry
}
'
,
'\$'
,
10
,
silent
=
True
)
if
pullResult
.
count
(
'Storing signatures'
)
==
0
:
return
None
return
imageName
def
_get_image_size
(
self
,
sshSession
,
image
,
tag
):
# get the SHA of the image we built using the image name and its tag
sshSession
.
command
(
f'oc describe is
{
image
}
| grep -A4
{
tag
}
'
,
'\$'
,
5
)
...
...
@@ -216,7 +204,7 @@ class Cluster:
# Workaround for some servers, we need to erase completely the workspace
if
self
.
forcedWorkspaceCleanup
:
mySSH
.
command
(
f'
sudo
rm -Rf
{
lSourcePath
}
'
,
'\$'
,
15
)
mySSH
.
command
(
f'rm -Rf
{
lSourcePath
}
'
,
'\$'
,
15
)
cls_containerize
.
CreateWorkspace
(
mySSH
,
lSourcePath
,
self
.
ranRepository
,
self
.
ranCommitID
,
self
.
ranTargetBranch
,
self
.
ranAllowMerge
)
# we don't necessarily need a forced workspace cleanup, but in
...
...
ci-scripts/cls_containerize.py
View file @
eb15d733
...
...
@@ -67,7 +67,7 @@ def CreateWorkspace(sshSession, sourcePath, ranRepository, ranCommitID, ranTarge
sshSession
.
command
(
'git config user.email "jenkins@openairinterface.org"'
,
'\$'
,
5
)
sshSession
.
command
(
'git config user.name "OAI Jenkins"'
,
'\$'
,
5
)
sshSession
.
command
(
'
sudo
git clean -x -d -ff'
,
'\$'
,
30
)
sshSession
.
command
(
'git clean -x -d -ff'
,
'\$'
,
30
)
sshSession
.
command
(
'mkdir -p cmake_targets/log'
,
'\$'
,
5
)
# if the commit ID is provided use it to point to it
if
ranCommitID
!=
''
:
...
...
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