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

This commit is contained in:
Juan Ferrer 2024-07-10 10:54:47 +02:00
parent fd11c1ea00
commit 5186387162
1 changed files with 10 additions and 51 deletions

61
Jenkinsfile vendored
View File

@ -37,70 +37,29 @@ pipeline {
}
steps {
sh 'debuild -us -uc -b'
//sh 'mkdir -p output'
//sh 'mv ../*.deb ../*.build ../*.changes ../*.buildinfo output'
script {
def files = findFiles(glob: '../*.changes')
files.each { file -> changesFile = file.name }
def files = findFiles(glob: '../hedera-web_*.changes')
files.each { file -> env.CHANGES_FILE = file.name }
}
withCredentials([sshUserPrivateKey(
credentialsId: 'jenkins-agent',
keyFileVariable: 'keyFile'
keyFileVariable: 'KEY_FILE'
)]) {
sh 'eval "$(ssh-agent -s)"'
sh 'ssh-add "$KEY_FILE"'
configFileProvider([
configFile(fileId: "dput.cf",
variable: 'DPUT_CONFIG')
]) {
echo changesFile
echo 'dput --config $DPUT_CONFIG verdnatura'
sleep 86400
echo env.DPUT_CONFIG
echo env.KEY_FILE
echo env.CHANGES_FILE
sh 'dput --config "$DPUT_CONFIG" verdnatura "$CHANGES_FILE"'
}
}
//stash includes: 'output/*', name: 'debuildOutput'
}
}
stage('Reprepro') {
when {
anyOf {
branch 'master'
branch 'test'
}
}
environment {
REPREPRO_BASE_DIR = '/var/lib/reprepro/repo'
}
steps {
unstash 'debuildOutput'
script {
def files = findFiles(glob: 'output/*.changes')
files.each { file -> changesFile = file.name }
}
withCredentials([sshUserPrivateKey(
credentialsId: 'jenkins-agent',
usernameVariable: 'user',
keyFileVariable: 'keyFile'
)]) {
script {
remote.user = user
remote.identityFile = keyFile
remote.name = 'reprepro'
remote.host = 'reprepro.reprepro'
remote.allowAnyHosts = true
}
sshPut([
remote: remote,
from: "output/$changesFile",
into: "$REPREPRO_BASE_DIR/incoming"
])
sshCommand([
remote: remote,
command: "reprepro processincoming default $changesFile"
])
}
}
}
stage('Deploy') {