From baa596430e757ebe57251794b37aa7778c7f250c Mon Sep 17 00:00:00 2001 From: Juan Ferrer Toribio Date: Thu, 4 Jul 2024 11:08:26 +0200 Subject: [PATCH] fix: refs #7643 Reprepro stage --- Jenkinsfile | 30 ++++++++++++++++++++++++++++-- 1 file changed, 28 insertions(+), 2 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 8a8d284c..521c9feb 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -4,6 +4,7 @@ def BRANCH_ENV = [ test: 'test', master: 'production' ] +def remote = [:] node { stage('Setup') { @@ -35,8 +36,33 @@ pipeline { } } steps { - sh 'debuild -us -uc -b' - sh 'vn-includedeb bookworm' + sh 'debuild -us -uc -b --buildinfo-option="-o output" --changes-option="-o output"' + } + } + stage('Reprepro') { + when { + anyOf { + branch 'master' + branch 'test' + } + } + steps { + script { + remote.name = 'reprerpo' + remote.host = 'reprepro.reprepro' + remote.user = 'root' + remote.identityFile = '/home/jenkins/.ssh/id_ed25519' + 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" + ]) } } stage('Container') {