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
6ab196d0
Commit
6ab196d0
authored
Jan 17, 2022
by
Raphael Defosseux
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix(ci): no history also for single ssh commands
Signed-off-by:
Raphael Defosseux
<
raphael.defosseux@eurecom.fr
>
parent
5dae0096
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
2 deletions
+4
-2
ci-scripts/sshconnection.py
ci-scripts/sshconnection.py
+4
-2
No files found.
ci-scripts/sshconnection.py
View file @
6ab196d0
...
...
@@ -157,22 +157,24 @@ class SSHConnection():
if
not
silent
:
logging
.
debug
(
commandline
)
self
.
cmd2Results
=
''
noHistoryCmd
=
'unset HISTFILE; '
+
commandline
myHost
=
self
.
username
+
'@'
+
self
.
ipaddress
# CAUTION: THIS METHOD IMPLIES THAT THERE ARE VALID SSH KEYS
# BETWEEN THE PYTHON EXECUTOR NODE AND THE REMOTE HOST
# OTHERWISE IT WON'T WORK
lSsh
=
subprocess
.
Popen
([
"ssh"
,
"%s"
%
myHost
,
commandline
],
shell
=
False
,
stdout
=
subprocess
.
PIPE
,
stderr
=
subprocess
.
PIPE
)
lSsh
=
subprocess
.
Popen
([
"ssh"
,
"%s"
%
myHost
,
noHistoryCmd
],
shell
=
False
,
stdout
=
subprocess
.
PIPE
,
stderr
=
subprocess
.
PIPE
)
self
.
cmd2Results
=
str
(
lSsh
.
stdout
.
readlines
())
def
command3
(
self
,
commandline
,
timeout
,
silent
=
False
):
if
not
silent
:
logging
.
debug
(
commandline
)
self
.
cmd2Results
=
''
noHistoryCmd
=
'unset HISTFILE; '
+
commandline
myHost
=
self
.
username
+
'@'
+
self
.
ipaddress
# CAUTION: THIS METHOD IMPLIES THAT THERE ARE VALID SSH KEYS
# BETWEEN THE PYTHON EXECUTOR NODE AND THE REMOTE HOST
# OTHERWISE IT WON'T WORK
lSsh
=
subprocess
.
Popen
([
"ssh"
,
"%s"
%
myHost
,
commandline
],
shell
=
False
,
stdout
=
subprocess
.
PIPE
,
stderr
=
subprocess
.
PIPE
)
lSsh
=
subprocess
.
Popen
([
"ssh"
,
"%s"
%
myHost
,
noHistoryCmd
],
shell
=
False
,
stdout
=
subprocess
.
PIPE
,
stderr
=
subprocess
.
PIPE
)
return
lSsh
.
stdout
.
readlines
()
...
...
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