1
0

#26 Add GPG signing

This commit is contained in:
2026-01-17 20:34:48 +01:00
parent ea45ef73f4
commit 06e72a794f

9
build/Jenkinsfile vendored
View File

@@ -17,10 +17,17 @@ pipeline {
steps {
withCredentials([usernamePassword(credentialsId: 'Jenkins_Gitea',
usernameVariable: 'GITEA_CREDS_USR',
passwordVariable: 'GITEA_CREDS_PSW')]) {
passwordVariable: 'GITEA_CREDS_PSW'),
file(credentialsId: 'jenkins-gpg-key', variable: 'GPG_KEY_FILE')]) {
sh '''
gpg --batch --import "${GPG_KEY_FILE}"
KEY_ID=$(gpg --list-keys --with-colons | awk -F: '/^pub:/ { print $5; exit }')
git config user.email "jenkins@77zzcx7.de"
git config user.name "Jenkins"
git config user.signingkey "$KEY_ID"
git config commit.gpgsign true
git config tag.gpgSign true
git remote set-url origin https://${GITEA_CREDS_USR}:${GITEA_CREDS_PSW}@${GIT_URL_CLEAN}