Refactor Publish Repository stage in Jenkinsfile to streamline GPG passphrase usage and improve command structure
This commit is contained in:
Vendored
+16
-18
@@ -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
|
||||
"
|
||||
'''
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user