Skip to content

Commit

Permalink
Enable commit signing with SSH key
Browse files Browse the repository at this point in the history
  • Loading branch information
thespad committed Aug 12, 2024
1 parent 0e9d9ae commit b6642ef
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions roles/generate-jenkins/templates/Jenkinsfile.j2
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,25 @@ pipeline {
GITLAB_NAMESPACE=credentials('gitlab-namespace-id')
DOCKERHUB_TOKEN=credentials('docker-hub-ci-pat')
QUAYIO_API_TOKEN=credentials('quayio-repo-api-token')
GIT_SIGNING_KEY=credentials('484fbca6-9a4f-455e-b9e3-97ac98785f5f')
{% for repo_var in repo_vars %}
{{ repo_var }}
{% endfor %}
}
stages {
stage("Set git config"){
steps{
sh '''#!/bin/bash
echo ${GIT_SIGNING_KEY} > /config/.ssh/id_sign
git config --global gpg.format ssh
git config --global user.signingkey /config/.ssh/id_sign
git config --global commit.gpgsign true
git config --global user.name LinuxServer-CI
git config --global user.email [email protected]
'''
}
}
}
// Setup all the basic environment variables needed for the build
stage("Set ENV Variables base"){
steps{
Expand Down

0 comments on commit b6642ef

Please sign in to comment.