diff --git a/Jenkinsfile b/Jenkinsfile index 2ede831ed..80d414289 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -1,10 +1,5 @@ #!/usr/bin/env groovy -def remote = [:] -remote.name = "im-communication" -remote.host = "192.168.250.200" -remote.allowAnyHosts = true - pipeline { agent { label 'maven-3-9-5-eclipse-temurin-21' @@ -14,10 +9,14 @@ pipeline { steps { sh 'mvn -B -U clean package' sh 'mvn -B --projects klab.core.api javadoc:javadoc' - withCredentials([sshUserPrivateKey(credentialsId: 'jenkins-im-communication', keyFileVariable: 'identity', passphraseVariable: '', usernameVariable: 'ubuntu')]) { - remote.user = userName - remote.identityFile = identity - stage("Copy Javadocs") { + script { + def remote = [:] + remote.name = "im-communication" + remote.host = "192.168.250.200" + remote.allowAnyHosts = true + withCredentials([sshUserPrivateKey(credentialsId: 'jenkins-im-communication', keyFileVariable: 'identity')]) { + remote.user = 'ubuntu' + remote.identityFile = identity sshPut remote: remote, from: 'klab.core.api/target/site/apidocs/', into: '/home/ubuntu/repos/documents.production.compose/javadocs' } }