Skip to content

Commit

Permalink
Bugfix: Automatically generated linux installer packages are not bein…
Browse files Browse the repository at this point in the history
…g signed. (#1111)

* Fix bug in linux package gpg signing

* Add omitted stack trace.
  • Loading branch information
steelhead31 authored Jan 24, 2025
1 parent cc63796 commit c8df680
Showing 1 changed file with 28 additions and 7 deletions.
35 changes: 28 additions & 7 deletions linux_new/Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -743,15 +743,36 @@ stage('Build & Archive Package') {
}

if (params.ENABLEGPGSIGNING) {
def privateKey = 'adoptium-artifactory-rsa-key'
withCredentials([file(credentialsId: privateKey, variable: 'GPG_KEY')]) {
buildCli += " -PGPG_KEY_PATH=${GPG_KEY}"
if (DistArrayElement =="debian") {
echo "Debian Does Not Use Signing"
buildCli = params.ENABLEDEBUG.toBoolean() ? buildCli + ' --stacktrace' : buildCli
sh("$buildCli")
}

if (DistArrayElement == "rhel" || DistArrayElement == "suse") { // for RPM based: RedHat / Suse / Alpine
echo "Using RPM Private KEY"
def privateKey = 'adoptium-artifactory-gpg-key'
withCredentials([file(credentialsId: privateKey, variable: 'GPG_KEY')]) {
buildCli += " -PGPG_KEY=${env.GPG_KEY}"
buildCli = params.ENABLEDEBUG.toBoolean() ? buildCli + ' --stacktrace' : buildCli
sh("$buildCli")
}
}

if (DistArrayElement == "alpine") {
echo "Using Alpine Private KEY"
def privateKey = 'adoptium-artifactory-rsa-key'
withCredentials([file(credentialsId: privateKey, variable: 'GPG_KEY')]) {
buildCli += " -PGPG_KEY=${env.GPG_KEY}"
buildCli = params.ENABLEDEBUG.toBoolean() ? buildCli + ' --stacktrace' : buildCli
sh("$buildCli")
}
}
} else {
echo "Building Without Signing"
buildCli = params.ENABLEDEBUG.toBoolean() ? buildCli + ' --stacktrace' : buildCli
sh("$buildCli")
}

buildCli = params.ENABLEDEBUG.toBoolean() ? buildCli + ' --stacktrace' : buildCli
// echo "Build CLI : ${buildCli}"
sh("$buildCli")
}
} catch (Exception ex) {
echo "Exception in build for ${DistArrayElement}: ${ex}"
Expand Down

0 comments on commit c8df680

Please sign in to comment.