Hi all,
I am using the Publish Over SSH plugin and I want to get the execCommand result to variable.
My Pipeline script :
sshPublisher(
continueOnError: false,
failOnError: true,
publishers: [
sshPublisherDesc(
verbose: true,
configName: 'my_server',
sshCredentials: [ username: params.Login, encryptedPassphrase: hudson.util.Secret.toString(params.Password) ],
transfers: [ sshTransfer(execCommand: 'cat file.txt')]
)
]
)
env.file = execCommand.Result // Don't work, just example
echo 'env.file : ' + env.file
I want to stock value “execCommand” to “env.file” variable to use it in next stage.
An idea ?
Thank you