I work with Jenkins not long time and now need to make sshCommand with parameters to remote linux server but with parameters is not working
I put all string of command in parameter but I cannot send it with sshCommand too
Can you advise please how to send command to remote server with parameters?
Now my pipeline script is look like that:
String comm = 'java -jar *.jar -param '+param1+' -param '+param2
node {
def remote = [:]
remote.name = 'test'
remote.host = '*'
remote.user = '*'
remote.password = '*'
remote.allowAnyHosts = true
stage('Remote SSH') {
sshCommand remote: remote, command: ${comm}
}
}