Документация по https://jenkins.io/doc/pipeline/steps/publish-over-ssh/#code-sshpublisher-code-send-build-artifacts-over-ssh не слишком понятна ...
sshPublisher publishers transfer sourceFiles: '/appdata/jenkins/jobs/project/otcm-${pom.version}.tar.gz'
Вышеприведенное дает мне ошибки «нет такого свойства». Какой правильный синтаксис для этого?
Мой jenkinsfile:
node {
stage 'Clean Up'
deleteDir()
stage 'Env Setup'
env.JAVA_HOME = "${tool 'JDK 8'}"
def mvnHome = tool '3.0.3'
stage 'Compile/Package'
checkout scm
stage 'Compile/Package - Get app version'
def pom = readMavenPom file: 'pom.xml'
echo "${pom.version}"
stage 'Compile/Package - Compile and upload to S3'
sh "${mvnHome}/bin/mvn clean install -DskipTests"
/* should i bother with pushing to s3 since snapshot? */
stage 'Push to S3'
stage 'Install'
sh "ssh devci@server 'rm -rf /appdata/devci/app'"
sh "ssh devci@server 'mkdir /appdata/devci/app'"
/* ssh push the tar to remote dir */
/* use the jenkins sshPublisher??? */
/* Remote - explode tar */
/* Remote - download project properties */
/* Remove - start app without new relic using custom port 8007 */
}