diff --git a/Jenkinsfile b/Jenkinsfile index b79a0eaa..175df796 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -52,20 +52,22 @@ pipeline { } steps { unstash 'debuildOutput' + script { debFile = sh(script: 'ls output/*.deb', returnStdout: true).trim() - } - withCredentials([sshUserPrivateKey( - credentialsId: 'jenkins-agent', - usernameVariable: 'user', - keyFileVariable: 'identityFile' - )]) { remote.name = 'reprepro' remote.host = 'reprepro.reprepro' remote.allowAnyHosts = true - remote.user = user - remote.identityFile = identityFile + + withCredentials([sshUserPrivateKey( + credentialsId: 'jenkins-agent', + usernameVariable: 'user', + keyFileVariable: 'identityFile' + )]) { + remote.user = user + remote.identityFile = identityFile + } } sshPut([