ci: refs #7643 Reprepro SSH credentials fix
gitea/hedera-web/pipeline/head There was a failure building this commit
Details
gitea/hedera-web/pipeline/head There was a failure building this commit
Details
This commit is contained in:
parent
dcf46094f0
commit
5cf6ef5b1c
|
@ -52,33 +52,31 @@ pipeline {
|
||||||
}
|
}
|
||||||
steps {
|
steps {
|
||||||
unstash 'debuildOutput'
|
unstash 'debuildOutput'
|
||||||
|
|
||||||
script {
|
script {
|
||||||
debFile = sh(script: 'ls output/*.deb', returnStdout: true).trim()
|
debFile = sh(script: 'ls output/*.deb', returnStdout: true).trim()
|
||||||
|
}
|
||||||
|
|
||||||
|
withCredentials([sshUserPrivateKey(
|
||||||
|
credentialsId: 'jenkins-agent',
|
||||||
|
usernameVariable: 'user',
|
||||||
|
keyFileVariable: 'identityFile'
|
||||||
|
)]) {
|
||||||
|
remote.user = user
|
||||||
|
remote.identityFile = identityFile
|
||||||
remote.name = 'reprepro'
|
remote.name = 'reprepro'
|
||||||
remote.host = 'reprepro.reprepro'
|
remote.host = 'reprepro.reprepro'
|
||||||
remote.allowAnyHosts = true
|
remote.allowAnyHosts = true
|
||||||
|
|
||||||
withCredentials([sshUserPrivateKey(
|
sshPut([
|
||||||
credentialsId: 'jenkins-agent',
|
remote: remote,
|
||||||
usernameVariable: 'user',
|
from: "$debFile",
|
||||||
keyFileVariable: 'identityFile'
|
into: '/tmp'
|
||||||
)]) {
|
])
|
||||||
remote.user = user
|
sshcommand([
|
||||||
remote.identityFile = identityFile
|
remote: remote,
|
||||||
}
|
command: "sudo -u www-data reprepro -b /reprepro --gnupghome /reprepro/.gnupg includedeb bookworm /tmp/$debFile"
|
||||||
|
])
|
||||||
}
|
}
|
||||||
|
|
||||||
sshPut([
|
|
||||||
remote: remote,
|
|
||||||
from: "$debFile",
|
|
||||||
into: '/tmp'
|
|
||||||
])
|
|
||||||
sshcommand([
|
|
||||||
remote: remote,
|
|
||||||
command: "sudo -u www-data reprepro -b /reprepro --gnupghome /reprepro/.gnupg includedeb bookworm /tmp/$debFile"
|
|
||||||
])
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
stage('Container') {
|
stage('Container') {
|
||||||
|
|
Loading…
Reference in New Issue