#26 Add GPG signing
This commit is contained in:
9
build/Jenkinsfile
vendored
9
build/Jenkinsfile
vendored
@@ -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}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user