From df90ab2fdfb103987affe26256784d1ef4c43157 Mon Sep 17 00:00:00 2001 From: Andrew Leonard Date: Wed, 11 Dec 2024 12:14:17 +0000 Subject: [PATCH 1/3] Prevent build_job_generator regeneration from blowing up if no targetConfigurations Signed-off-by: Andrew Leonard --- pipelines/build/regeneration/build_job_generator.groovy | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/pipelines/build/regeneration/build_job_generator.groovy b/pipelines/build/regeneration/build_job_generator.groovy index 4a6962c0c..f58387705 100644 --- a/pipelines/build/regeneration/build_job_generator.groovy +++ b/pipelines/build/regeneration/build_job_generator.groovy @@ -211,7 +211,10 @@ node('worker') { checkoutUserPipelines() } - if (jenkinsCreds != '') { + if (targetConfigurations.size() == 0) { + println "[WARNING] No targetConfigurations to be generated for this version" + } else { + if (jenkinsCreds != '') { withCredentials([usernamePassword( credentialsId: "${JENKINS_AUTH}", usernameVariable: 'jenkinsUsername', @@ -240,7 +243,7 @@ node('worker') { jobType ).regenerate() } - } else { + } else { println '[WARNING] No Jenkins API Credentials have been provided! If your server does not have anonymous read enabled, you may encounter 403 api request error code.' regenerationScript( javaVersion, @@ -263,6 +266,7 @@ node('worker') { checkoutCreds, jobType ).regenerate() + } } println '[SUCCESS] All done!' } finally { From 99e068e4c8f174ffd49be0d5d11b71623c3c9450 Mon Sep 17 00:00:00 2001 From: Andrew Leonard Date: Wed, 11 Dec 2024 14:02:46 +0000 Subject: [PATCH 2/3] Allow for multiple tip/head repo release versions Signed-off-by: Andrew Leonard --- tools/nightly_build_and_test_stats.groovy | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/tools/nightly_build_and_test_stats.groovy b/tools/nightly_build_and_test_stats.groovy index 7ebcbca73..6610feef7 100644 --- a/tools/nightly_build_and_test_stats.groovy +++ b/tools/nightly_build_and_test_stats.groovy @@ -57,7 +57,7 @@ def getPlatformReproTestMap() { // Check if the given tag is a -ga tag ? def isGaTag(String version, String tag) { - if (version == "${params.TIP_RELEASE}".trim()) { + if ("${params.TIP_RELEASES}".contains(version)) { // Tip release has no GA tags return false } @@ -595,7 +595,7 @@ node('worker') { def apiUrl = "${params.API_URL}" def slackChannel = "${params.SLACK_CHANNEL}" def featureReleases = "${params.FEATURE_RELEASES}".split("[, ]+") // feature versions - def tipRelease = "${params.TIP_RELEASE}".trim() // Current jdk(head) version + def tipReleases = "${params.TIP_RELEASES}".split("[, ]+") // Current jdk(head) versions def nightlyStaleDays = "${params.MAX_NIGHTLY_STALE_DAYS}" def amberBuildAlertLevel = params.AMBER_BUILD_ALERT_LEVEL ? params.AMBER_BUILD_ALERT_LEVEL as Integer : -99 def amberTestAlertLevel = params.AMBER_TEST_ALERT_LEVEL ? params.AMBER_TEST_ALERT_LEVEL as Integer : -99 @@ -668,8 +668,9 @@ node('worker') { } } - // Check tip_release status, by querying binaries repo as API does not server the "tip" dev release - if (tipRelease != "") { + // Check tip_releases status, by querying binaries repo as API does not server the "tip" dev releases + if (tipReleases.size() > 0) { + tipReleases.each { tipRelease -> def latestOpenjdkBuild = getLatestOpenjdkBuildTag(tipRelease) def tipVersion = tipRelease.replaceAll("[a-z]","").toInteger() def releaseName = getLatestBinariesTag("${tipVersion}") @@ -677,6 +678,7 @@ node('worker') { verifyReleaseContent(tipRelease, releaseName, variant, status) echo " ${tipRelease} release binaries verification: "+status['assets'] healthStatus[tipRelease] = status + } } } } @@ -698,8 +700,8 @@ node('worker') { def pipelinesOfInterest = "" def allReleases = [] allReleases.addAll(featureReleases) - if (tipRelease != "") { - allReleases.add(tipRelease) + if (tipReleases.size() > 0) { + allReleases.addAll(tipReleases) } if ("${params.NON_TAG_BUILD_RELEASES}".trim() != "") { allReleases.addAll(nonTagBuildReleases) @@ -891,7 +893,7 @@ node('worker') { } // Slack message: - slackSend(channel: slackChannel, color: statusColor, message: 'Adoptium last 7 days Overall Build Success Rating : *' + variant + '* => *' + overallNightlySuccessRating + '* %\n Build Job Rating: ' + totalBuildJobs + ' jobs (' + nightlyBuildSuccessRating.intValue() + '%) Test Job Rating: ' + totalTestJobs + ' jobs (' + nightlyTestSuccessRating.intValue() + '%) <' + BUILD_URL + '/console|Detail>') +//// slackSend(channel: slackChannel, color: statusColor, message: 'Adoptium last 7 days Overall Build Success Rating : *' + variant + '* => *' + overallNightlySuccessRating + '* %\n Build Job Rating: ' + totalBuildJobs + ' jobs (' + nightlyBuildSuccessRating.intValue() + '%) Test Job Rating: ' + totalTestJobs + ' jobs (' + nightlyTestSuccessRating.intValue() + '%) <' + BUILD_URL + '/console|Detail>') echo 'Adoptium last 7 days Overall Build Success Rating : *' + variant + '* => *' + overallNightlySuccessRating + '* %\n Build Job Rating: ' + totalBuildJobs + ' jobs (' + nightlyBuildSuccessRating.intValue() + '%) Test Job Rating: ' + totalTestJobs + ' jobs (' + nightlyTestSuccessRating.intValue() + '%) <' + BUILD_URL + '/console|Detail>' } @@ -901,8 +903,8 @@ node('worker') { echo '-------------- Latest pipeline health report ------------------' def allReleases = [] allReleases.addAll(featureReleases) - if (tipRelease != "") { - allReleases.add(tipRelease) + if (tipReleases.size() > 0) { + allReleases.addAll(tipReleases) } if (("${params.NON_TAG_BUILD_RELEASES}".trim() != "")) { allReleases.addAll(nonTagBuildReleases) @@ -1048,7 +1050,7 @@ node('worker') { def releaseLink = "<" + status['assetsUrl'] + "|${releaseName}>" def fullMessage = "${featureRelease} latest 'EA Build' publish status: *${health}*.${reproducibilityText} Build: ${releaseLink}.${lastPublishedMsg}${errorMsg}${missingMsg}" echo "===> ${fullMessage}" - slackSend(channel: slackChannel, color: slackColor, message: fullMessage) +//// slackSend(channel: slackChannel, color: slackColor, message: fullMessage) } echo '----------------------------------------------------------------' } From 57bb224de4f98dd3d6ebe356246c5bbdb12f88a9 Mon Sep 17 00:00:00 2001 From: Andrew Leonard Date: Wed, 11 Dec 2024 14:33:45 +0000 Subject: [PATCH 3/3] Allow for multiple tip/head repo release versions Signed-off-by: Andrew Leonard --- tools/nightly_build_and_test_stats.groovy | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/nightly_build_and_test_stats.groovy b/tools/nightly_build_and_test_stats.groovy index 6610feef7..6b62a2298 100644 --- a/tools/nightly_build_and_test_stats.groovy +++ b/tools/nightly_build_and_test_stats.groovy @@ -893,7 +893,7 @@ node('worker') { } // Slack message: -//// slackSend(channel: slackChannel, color: statusColor, message: 'Adoptium last 7 days Overall Build Success Rating : *' + variant + '* => *' + overallNightlySuccessRating + '* %\n Build Job Rating: ' + totalBuildJobs + ' jobs (' + nightlyBuildSuccessRating.intValue() + '%) Test Job Rating: ' + totalTestJobs + ' jobs (' + nightlyTestSuccessRating.intValue() + '%) <' + BUILD_URL + '/console|Detail>') + slackSend(channel: slackChannel, color: statusColor, message: 'Adoptium last 7 days Overall Build Success Rating : *' + variant + '* => *' + overallNightlySuccessRating + '* %\n Build Job Rating: ' + totalBuildJobs + ' jobs (' + nightlyBuildSuccessRating.intValue() + '%) Test Job Rating: ' + totalTestJobs + ' jobs (' + nightlyTestSuccessRating.intValue() + '%) <' + BUILD_URL + '/console|Detail>') echo 'Adoptium last 7 days Overall Build Success Rating : *' + variant + '* => *' + overallNightlySuccessRating + '* %\n Build Job Rating: ' + totalBuildJobs + ' jobs (' + nightlyBuildSuccessRating.intValue() + '%) Test Job Rating: ' + totalTestJobs + ' jobs (' + nightlyTestSuccessRating.intValue() + '%) <' + BUILD_URL + '/console|Detail>' } @@ -1050,7 +1050,7 @@ node('worker') { def releaseLink = "<" + status['assetsUrl'] + "|${releaseName}>" def fullMessage = "${featureRelease} latest 'EA Build' publish status: *${health}*.${reproducibilityText} Build: ${releaseLink}.${lastPublishedMsg}${errorMsg}${missingMsg}" echo "===> ${fullMessage}" -//// slackSend(channel: slackChannel, color: slackColor, message: fullMessage) + slackSend(channel: slackChannel, color: slackColor, message: fullMessage) } echo '----------------------------------------------------------------' }