From ddaff6afe93ba689edca6a2ccbbd94f3a32e03e5 Mon Sep 17 00:00:00 2001 From: Juan Ferrer Toribio Date: Tue, 9 Jul 2024 16:55:20 +0200 Subject: [PATCH] ci: refs #7643 Reprepro debug --- Jenkinsfile | 25 ++++++++++++------------- 1 file changed, 12 insertions(+), 13 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 0b47bcd9..1f0bfb9e 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -5,7 +5,7 @@ def BRANCH_ENV = [ master: 'production' ] def remote = [:] -def debFile +def changesFile node { stage('Setup') { @@ -38,8 +38,8 @@ pipeline { steps { sh 'debuild -us -uc -b' sh 'mkdir -p output' - sh 'mv ../*.deb ../*.build ../*.buildinfo ../*.changes output' - sleep 3600 + sh 'mv ../*.deb ../*.build ../*.changes output' + sleep 86400 stash includes: 'output/*', name: 'debuildOutput' } @@ -52,14 +52,13 @@ pipeline { } } environment { - REPREPRO_DIR = '/var/lib/reprepro' - REPO_DIR = "$REPREPRO_DIR/repo" + REPREPRO_BASE_DIR = '/var/lib/reprepro/repo' } steps { unstash 'debuildOutput' script { - def files = findFiles(glob: 'output/*.deb') - files.each { file -> debFile = file.name } + def files = findFiles(glob: 'output/*.changes') + files.each { file -> changesFile = file.name } } withCredentials([sshUserPrivateKey( @@ -76,12 +75,12 @@ pipeline { } sshPut([ remote: remote, - from: "output/$debFile", - into: "$REPO_DIR/incoming" + from: "output/$changesFile", + into: "$REPREPRO_BASE_DIR/incoming" ]) sshCommand([ remote: remote, - command: "reprepro -b $REPO_DIR --gnupghome $REPREPRO_DIR/.gnupg includedeb bookworm $REPO_DIR/incoming/$debFile" + command: "reprepro processincoming default $changesFile" ]) } } @@ -105,11 +104,11 @@ pipeline { } sh 'docker-compose build --build-arg BUILD_ID=$BUILD_ID --parallel' - sh "docker tag $IMAGE:$TAG $IMAGE:latest" + sh 'docker tag $IMAGE:$TAG $IMAGE:latest' sh 'docker login --username $CREDS_USR --password $CREDS_PSW $REGISTRY' - sh "docker push $IMAGE:$TAG" - sh "docker push $IMAGE:latest" + sh 'docker push $IMAGE:$TAG' + sh 'docker push $IMAGE:latest' withKubeConfig([ serverUrl: "$KUBERNETES_API",