ci: refs #7643 Reprepro SSH credentials
gitea/hedera-web/pipeline/head There was a failure building this commit Details

This commit is contained in:
Juan Ferrer 2024-07-05 11:08:44 +02:00
parent d6e7d3b025
commit 7174842cfa
1 changed files with 10 additions and 7 deletions

17
Jenkinsfile vendored
View File

@ -40,7 +40,7 @@ pipeline {
sh 'mkdir -p output'
sh 'mv ../*.deb ../*.build ../*.buildinfo ../*.changes output'
stash includes: 'output/*.deb', name: 'debPackage'
stash includes: 'output', name: 'debuildOutput'
}
}
stage('Reprepro') {
@ -51,16 +51,19 @@ pipeline {
}
}
steps {
unstash 'debPackage'
unstash 'debuildOutput'
debFile = sh(script: 'ls output/*.deb', returnStdout: true).trim()
script {
withCredentials([sshUserPrivateKey(
credentialsId: 'jenkins-agent',
usernameVariable: 'user'
keyFileVariable: 'identityFile'
)]) {
remote.name = 'reprepro'
remote.host = 'reprepro.reprepro'
remote.user = 'root'
remote.identityFile = '/home/jenkins/.ssh/id_ed25519'
remote.allowAnyHosts = true
debFile = sh(script: 'ls output/*.deb', returnStdout: true).trim()
remote.user = user
remote.identityFile = identityFile
}
sshPut([