gradle-ssh-plugin
gradle-ssh-plugin copied to clipboard
suggestion: consider adding cksum
Hi,
Just a suggestion: consider adding a cksum feature that will check the jar/war on the localhost and then compare with the remote jar/war cksum. If cksum test fails repeat, deploy 2 more times.
If interested, let me know - i could try to make it and do pull request for it. Cheers
Sounds good. Would you open the pull request?
I use the gradle-ssh-plugin to transfer webapps for deployment. While testing we are transfering a lot of large files so it would be nice if the plugin could detect that the file didn't change and only transfer changed files.
Would this feature fit in your PR scope?
I use rsync as a workaround to vastly improve upload performance. This build script uses the application plugin to produce a distribution which is then uploaded to the server. The ssh plugin is finally used to launch the application. I use ssh-add to provide a private key.
remotes {
myserver {
host = '1.2.3.4'
user = 'centos'
agent = true
}
}
task upload(type: Exec, dependsOn: installDist) {
commandLine 'rsync', '-az', project.installDist.destinationDir, "${remotes.myserver.user}@${remotes.myserver.host}:~"
}
task launch(dependsOn: upload) {
doLast {
ssh.run {
session(remotes.myserver) {
// ...
}
}
}
}