From d4dc60a1944a76c13741c439e55cab74ae67f7ae Mon Sep 17 00:00:00 2001 From: Daniel Date: Thu, 16 Jul 2026 11:33:34 +0200 Subject: [PATCH] Refactor Publish Repository stage in Jenkinsfile to update GPG passphrase handling and improve publishing logic --- Jenkinsfile | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index bbe2d4b..6b8b8cf 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -56,22 +56,22 @@ pipeline { stage("Publish Repository") { steps { sshagent(['srv01_elordenador_org']) { - + withCredentials([ string( - credentialsId: 'aptly_gpg_pass', + credentialsId: 'espos-gpg-passphrase', variable: 'GPG_PASS' ) ]) { - + sh ''' - ssh ${APTLY_HOST} << EOF - + ssh ${APTLY_HOST} "GPG_PASS='$GPG_PASS' bash -s" << 'EOF' + aptly repo add espos-unstable /tmp/*.deb - + if aptly publish list | grep -q espos-unstable then - aptly publish switch \ + aptly publish update \ -passphrase="$GPG_PASS" \ espos-unstable else @@ -81,13 +81,13 @@ pipeline { -passphrase="$GPG_PASS" \ espos-unstable fi - + EOF ''' } } } - } + } } post { success {