Skip to content

Commit

Permalink
Add release Tap collection and upload url (#1134)
Browse files Browse the repository at this point in the history
* Add release Tap collection and upload url

* Limit to adoptium jenkins

* Replace HUDSON_URL to JENKINS_URL as HUDSON_URL deprecates

* typo
  • Loading branch information
sophia-guo authored Nov 8, 2024
1 parent 174a0c1 commit 2f8b53d
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion pipelines/build/common/build_base_file.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -788,7 +788,7 @@ class Builder implements Serializable {
def osArch = 'all available OS&ARCHs'
def artifactsToCopy = '**/temurin/*.tar.gz,**/temurin/*.zip,**/temurin/*.sha256.txt,**/temurin/*.msi,**/temurin/*.pkg,**/temurin/*.json,**/temurin/*.sig'
def dryRun = false
def String releaseToolUrl = "${context.HUDSON_URL}job/build-scripts/job/release/job/refactor_openjdk_release_tool/parambuild?"
String releaseToolUrl = "${context.JENKINS_URL}job/build-scripts/job/release/job/refactor_openjdk_release_tool/parambuild?"
if ( config != null ) {
def prefixOfArtifactsToCopy = "**/${config.TARGET_OS}/${config.ARCHITECTURE}/${config.VARIANT}"
artifactsToCopy = "${prefixOfArtifactsToCopy}/*.tar.gz,${prefixOfArtifactsToCopy}/*.zip,${prefixOfArtifactsToCopy}/*.sha256.txt,${prefixOfArtifactsToCopy}/*.msi,${prefixOfArtifactsToCopy}/*.pkg,${prefixOfArtifactsToCopy}/*.json,${prefixOfArtifactsToCopy}/*.sig"
Expand Down Expand Up @@ -1034,6 +1034,21 @@ class Builder implements Serializable {
if (publish || release) {
if (release) {
context.println 'NOT PUBLISHING RELEASE AUTOMATICALLY, PLEASE SEE THE RERUN RELEASE PUBLISH BINARIES LINKS'
if (context.JENKINS_URL.contains('adoptium')) {
releaseSummary.appendText('</ul>', false)
releaseSummary.appendText("<b>TAP files COLLECTION and RELEASE:</b><ul>")
def urlJobName = URLEncoder.encode("${env.JOB_NAME}", 'UTF-8')
def tapCollectionUrl = "${context.JENKINS_URL}job/TAP_Collection/parambuild?Release_PipelineJob_Name=${urlJobName}"
releaseSummary.appendText("<li><a href=${tapCollectionUrl}> RELEASE TAPs COLLECTION</a></li>")
String releaseToolUrl = "${context.JENKINS_URL}job/build-scripts/job/release/job/refactor_openjdk_release_tool/parambuild?RELEASE=${release}}&UPSTREAM_JOB_NAME=TAP_Collection&UPLOAD_TESTRESULTS_ONLY=true&dryrun=false"
def tag = publishName
tag = URLEncoder.encode(tag, 'UTF-8')
def artifactsToCopy = '**/AQAvitTapFiles.tar.gz'
artifactsToCopy = URLEncoder.encode(artifactsToCopy, 'UTF-8')
def javaVersion=determineReleaseToolRepoVersion()
releaseToolUrl += "&VERSION=${javaVersion}&TAG=${tag}&ARTIFACTS_TO_COPY=${artifactsToCopy}"
releaseSummary.appendText("<li><a href=${releaseToolUrl}> RELEASE TEST RESULTS TAPs Link</a></li>")
}
} else {
try {
context.timeout(time: pipelineTimeouts.PUBLISH_ARTIFACTS_TIMEOUT, unit: 'HOURS') {
Expand Down

0 comments on commit 2f8b53d

Please sign in to comment.