I am working on gradle script and I have one plugin which automatically download the zip,jar and war file from artifactory after that I need to do ssh to the remote server and move that zip file to particaular location.
I am trying to do in the below way but getting error
// ------ Tell the script to get dependencies from artifactory ------
buildscript {
repositories {
maven {
url "http://cm.thm.com:80/artifactory/repo1-cache"
url "http://cm.thm.com:80/artifactory/libs-snapshot"
}
}
// ------ Tell the script to get dependencies from artifactory ------
dependencies {
classpath 'org.hidetake:gradle-ssh-plugin:0.4.3'
classpath ([ "com.tr.cm:cmgradleplugin:1.1.118" ])
}
}
apply plugin: 'com.truven.cm.cmgradleplugin'
apply plugin: 'org.hidetake.ssh'
/**
* Use the deploy task to download the artifact and then unzip it to a local directory
* -DjobName specifies the job that produced the artifact
* -DbuildNumber specifies the build Number for the artifact
*/
remotes {
webServer {
host = '10.2.12.912'
user = 'cc'
password = 'tr'
// identity = file('id_rsa')
}
}
task deployment(type: SshTask, dependsOn: deploy){
ssh.run {
session(remotes.webServer) {
put(analytics-engine-AnalyticsLib-4.0.0.78.zip, "/applications/analyticsengine")
execute 'unzip analytics-engine-AnalyticsLib-4.0.0.78.zip'
}
}
}
Below is the error
build file '/applications/jenkins/workspace/DeployArtifactToDev/environments/build.gradle': 43: unexpected token: 0.78 @ line 43, column 45.
analytics-engine-AnalyticsLib-4.0.0.78.zip,
^
1 error
Can someone tell me my ssh code is fine or do i need to change any thing?