gradle-ssh-plugin icon indicating copy to clipboard operation
gradle-ssh-plugin copied to clipboard

suggestion: consider adding cksum

Open zverbatim opened this issue 9 years ago • 3 comments

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

zverbatim avatar Feb 16 '16 20:02 zverbatim

Sounds good. Would you open the pull request?

int128 avatar Feb 21 '16 13:02 int128

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?

matthiasbalke avatar Jul 18 '16 17:07 matthiasbalke

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) {
              // ...
            }
        }
    }
}

EronWright avatar Mar 01 '17 22:03 EronWright