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
+16 -18
View File
@@ -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
"
'''
}
}