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

This commit is contained in:
Juan Ferrer 2024-07-05 13:05:06 +02:00
parent ab88575c72
commit 444732460e
1 changed files with 16 additions and 15 deletions

31
Jenkinsfile vendored
View File

@ -56,27 +56,28 @@ pipeline {
debFile = sh(script: 'ls output/*.deb', returnStdout: true).trim() debFile = sh(script: 'ls output/*.deb', returnStdout: true).trim()
} }
withCredentials([sshUserPrivateKey( script {
credentialsId: 'jenkins-agent', withCredentials([sshUserPrivateKey(
usernameVariable: 'user', credentialsId: 'jenkins-agent',
keyFileVariable: 'identityFile' usernameVariable: 'user',
)]) { keyFileVariable: 'identityFile'
script { )]) {
remote.user = user remote.user = user
remote.identityFile = identityFile remote.identityFile = identityFile
remote.name = 'reprepro' remote.name = 'reprepro'
remote.host = 'reprepro.reprepro' remote.host = 'reprepro.reprepro'
remote.allowAnyHosts = true remote.allowAnyHosts = true
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"
])
} }
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"
])
} }
} }
} }