Skip to content

Commit

Permalink
IM-204 Move sshPut to script section
Browse files Browse the repository at this point in the history
  • Loading branch information
iperdomo committed Nov 16, 2023
1 parent 1b3a410 commit 32ebf28
Showing 1 changed file with 8 additions and 9 deletions.
17 changes: 8 additions & 9 deletions Jenkinsfile
Original file line number Diff line number Diff line change
@@ -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'
Expand All @@ -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'
}
}
Expand Down

0 comments on commit 32ebf28

Please sign in to comment.