From 20f3fb6bd3eaaae867f9350e67ded5c15f711e88 Mon Sep 17 00:00:00 2001 From: Daniel Date: Thu, 16 Jul 2026 11:36:11 +0200 Subject: [PATCH] Refactor Publish Repository stage in Jenkinsfile to streamline GPG passphrase usage and improve command structure --- Jenkinsfile | 34 ++++++++++++++++------------------ 1 file changed, 16 insertions(+), 18 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index f7a02a8..a05db2b 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -65,24 +65,22 @@ pipeline { ]) { sh ''' - 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 update \ - -passphrase="$GPG_PASS" \ - espos-unstable - else - aptly publish repo \ - -distribution=espos-unstable \ - -component=main \ - -passphrase="$GPG_PASS" \ - espos-unstable - fi - - EOF + ssh ${APTLY_HOST} " + aptly repo add espos-unstable /tmp/*.deb + + if aptly publish list | grep -q espos-unstable + then + aptly publish update \ + -passphrase='${GPG_PASS}' \ + espos-unstable + else + aptly publish repo \ + -distribution=espos-unstable \ + -component=main \ + -passphrase='${GPG_PASS}' \ + espos-unstable + fi + " ''' } }