Skip to content

Commit

Permalink
CNJR-4327: Add Code Signing
Browse files Browse the repository at this point in the history
- Sign during promote
  • Loading branch information
neil-k-zero committed Dec 3, 2024
1 parent a61a28a commit 11c40c5
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,18 @@ properties([
// Performs release promotion. No other stages will be run
if (params.MODE == "PROMOTE") {
release.promote(params.VERSION_TO_PROMOTE) { infrapool, sourceVersion, targetVersion, assetDirectory ->
// Gather the SUMS file to sign
sums = "*SHA256SUMS"
infrapool.agentGet from: "${assetDirectory}/${sums}", to: "./"
sumFile = sh(script: "ls ${sums}", returnStdout: true).trim()
// Create .tar for signing
sh "mv ${sumFile} ${sumFile}.tar"
signArtifacts patterns: ["${sumFile}.tar"]
// Rename the sig file
sh "mv ${sumFile}.tar.sig ${sumFile}.sig"
// Copy back to assetDirectory
sigLocation = pwd() + "/${sumFile}.sig"
infrapool.agentPut from: "${sigLocation}", to: "${assetDirectory}"

}
// Copy Github Enterprise release to Github
Expand Down

0 comments on commit 11c40c5

Please sign in to comment.