Get
sshGet
Get a file or directory from the remote host.
Usage
Key | Type | Description |
---|---|---|
remote |
Remote, Mandatory, Refer to the Remote config for more details. |
Host config to run the command on. |
from |
String, Mandatory |
file or directory path from the remote node. |
to |
String, Mandatory |
file or directory path on current worksapce. |
failOnError |
boolean, default: |
If this is |
dryRun |
boolean, default: |
If this is true, no actual connection or operation is performed. |
More about remote key can be found in configuration section.
Example
node {
def remote = [:]
remote.name = 'test'
remote.host = 'test.domain.com'
remote.user = 'root'
remote.password = 'password'
remote.allowAnyHosts = true
stage('Remote SSH') {
sshGet remote: remote, from: 'abc.sh', into: 'abc_get.sh', override: true
}
}
Please take note to surround the code with a node.