The following plugin provides functionality available through Pipeline-compatible steps. Read more about how to integrate steps into your Pipeline in the Steps section of the Pipeline Syntax page.
For a list of other such plugins, see the Pipeline Steps Reference page.
sshCommand
: SSH Steps: sshCommand - Execute command on remote node.sshGet
: SSH Steps: sshGet - Get a file/directory from remote node.sshPut
: SSH Steps: sshPut - Put a file/directory on remote node.sshRemove
: SSH Steps: sshRemove - Remove a file/directory from remote node.sshScript
: SSH Steps: sshScript - Execute script(file) on remote node.sshCommand
: SSH Steps: sshCommand - Execute command on remote node.Takes a remote (map) of settings and command
to execute it on the remote node and returns output. See docs on the README for more information.
def remote = [:] remote.name = 'test' remote.host = 'test.domain.com' remote.user = 'root' remote.password = 'password' remote.allowAnyHosts = true stage('Remote SSH') { sshCommand remote: remote, command: "ls -lrt" sshCommand remote: remote, command: "for i in {1..5}; do echo -n \"Loop \$i \"; date ; sleep 1; done" }
command : String
dryRun : boolean
(optional)
failOnError : boolean
(optional)
remote
(optional)
sudo : boolean
(optional)
sshGet
: SSH Steps: sshGet - Get a file/directory from remote node.Takes a remote (map) of settings, local file/directory into
to get the given file/directory from
remote node. See docs on the README for more information.
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 }
from : String
into : String
dryRun : boolean
(optional)
failOnError : boolean
(optional)
filterBy : String
(optional)
filterRegex : String
(optional)
override : boolean
(optional)
remote
(optional)
sshPut
: SSH Steps: sshPut - Put a file/directory on remote node.Takes a remote (map) of settings, local file/directory from
workspace and path to put this into
remote node. See docs on the README for more information.
def remote = [:] remote.name = 'test' remote.host = 'test.domain.com' remote.user = 'root' remote.password = 'password' remote.allowAnyHosts = true stage('Remote SSH') { writeFile file: 'abc.sh', text: 'ls -lrt' sshPut remote: remote, from: 'abc.sh', into: '.' }
from : String
into : String
dryRun : boolean
(optional)
failOnError : boolean
(optional)
filterBy : String
(optional)
filterRegex : String
(optional)
remote
(optional)
sshRemove
: SSH Steps: sshRemove - Remove a file/directory from remote node.Takes a remote (map) of settings and path
(file/directory) to remove from remote node. See docs on the README for more information.
def remote = [:] remote.name = 'test' remote.host = 'test.domain.com' remote.user = 'root' remote.password = 'password' remote.allowAnyHosts = true stage('Remote SSH') { sshRemove remote: remote, path: "abc.sh" }
path : String
dryRun : boolean
(optional)
failOnError : boolean
(optional)
remote
(optional)
sshScript
: SSH Steps: sshScript - Execute script(file) on remote node.Takes a remote (map) of settings and script a shell script file to execute it on the remote node and returns output. See docs on the README for more information.
def remote = [:] remote.name = 'test' remote.host = 'test.domain.com' remote.user = 'root' remote.password = 'password' remote.allowAnyHosts = true stage('Remote SSH') { writeFile file: 'abc.sh', text: 'ls -lrt' sshScript remote: remote, script: "abc.sh" }
script : String
dryRun : boolean
(optional)
failOnError : boolean
(optional)
remote
(optional)