Refactor Publish Repository stage in Jenkinsfile to streamline GPG passphrase usage and improve command structure

This commit is contained in:
2026-07-16 11:36:11 +02:00
parent 525a2a0f47
commit 20f3fb6bd3
Vendored
+4 -6
View File
@@ -65,24 +65,22 @@ pipeline {
]) { ]) {
sh ''' sh '''
ssh ${APTLY_HOST} "GPG_PASS='$GPG_PASS' bash -s" << 'EOF' ssh ${APTLY_HOST} "
aptly repo add espos-unstable /tmp/*.deb aptly repo add espos-unstable /tmp/*.deb
if aptly publish list | grep -q espos-unstable if aptly publish list | grep -q espos-unstable
then then
aptly publish update \ aptly publish update \
-passphrase="$GPG_PASS" \ -passphrase='${GPG_PASS}' \
espos-unstable espos-unstable
else else
aptly publish repo \ aptly publish repo \
-distribution=espos-unstable \ -distribution=espos-unstable \
-component=main \ -component=main \
-passphrase="$GPG_PASS" \ -passphrase='${GPG_PASS}' \
espos-unstable espos-unstable
fi fi
"
EOF
''' '''
} }
} }