Skip to content

Commit

Permalink
Sign binaries in pipeline job
Browse files Browse the repository at this point in the history
Signed-off-by: Stewart X Addison <[email protected]>
  • Loading branch information
sxa authored and Stewart X Addison committed Jun 14, 2022
1 parent 7aa344d commit 15806d6
Showing 1 changed file with 28 additions and 1 deletion.
29 changes: 28 additions & 1 deletion pipelines/build/common/openjdk_build_pipeline.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -496,7 +496,7 @@ class Build {
selector: context.specific("${signJob.getNumber()}"),
filter: 'workspace/target/*',
fingerprintArtifacts: true,
target: "workspace/target/",
target: 'workspace/target/',
flatten: true)


Expand All @@ -507,6 +507,33 @@ class Build {
}
}
}
context.stage("GPG sign") {

context.println "RUNNING sign_temurin_gpg for ${buildConfig.TARGET_OS}/${buildConfig.ARCHITECTURE} ..."

def params = [
context.string(name: 'UPSTREAM_JOB_NUMBER', value: "${env.BUILD_NUMBER}"),
context.string(name: 'UPSTREAM_JOB_NAME', value: "${env.JOB_NAME}"),
context.string(name: 'UPSTREAM_DIR', value: "workspace/target"),
['$class': 'LabelParameterValue', name: 'NODE_LABEL', label: "built-in"]
]

def signSHAsJob = context.build job: "build-scripts/release/sign_temurin_gpg",
propagate: true,
parameters: params

context.node('built-in || master') {
context.copyArtifacts(
projectName: "build-scripts/release/sign_temurin_gpg",
selector: context.specific("${signSHAsJob.getNumber()}"),
filter: '**/*.sig',
fingerprintArtifacts: true,
target: 'workspace/target/',
flatten: true)
// Archive GPG signatures in Jenkins
context.archiveArtifacts artifacts: "workspace/target/*.sig"
}
}
}

/*
Expand Down

0 comments on commit 15806d6

Please sign in to comment.