gradle-ssh-plugin
gradle-ssh-plugin copied to clipboard
Remote script execution
Executing Groovy script on the remote host.
task executeScript(type: SshTask) {
session(remotes.server) {
executeScript groovy: """
// here will be executed on the remote host
println System.properties['user.name']
"""
}
}
Also giving dependencies:
dependencies {
remoteRuntime 'org.codehaus.groovy:groovy-all:2.3.0'
}
task executeScript(type: SshTask) {
session(remotes.server) {
executeScript classpath: dependencies.remoteRuntime, groovy: """
// here will be executed on the remote host
println System.properties['user.name']
"""
}
}
}
TODO:
- What is default groovy dependencies? Bundled one with Gradle?