Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replacing JDK20 with JDK21 in pipelines #765

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/comment-bot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,4 @@ jobs:
In order to run the advanced [pipeline tests](https://github.com/adoptium/ci-jenkins-pipelines/tree/master/pipelines/build/prTester#openjdk-build-pr-tester) (executing a set of mock pipelines), it requires an admin to post `run tests` on this PR.
If you are not an admin, please ask for one's attention in [#infrastructure on Slack](https://adoptium.slack.com/archives/C53GHCXL4) or ping one here.
To run full set of tests, use "run tests"; a subset of tests on specific jdk version, use "run tests quick 11,20"
To run full set of tests, use "run tests"; a subset of tests on specific jdk version, use "run tests quick 11,21"
166 changes: 148 additions & 18 deletions README.md

Large diffs are not rendered by default.

37 changes: 27 additions & 10 deletions docs/generateBuildMatrix.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,20 @@

# Generates markdown table of build job status

allPlatforms=("jdk8u" "jdk11u" "jdk17u" "jdk20u" "jdk")
allJdkVersions=("jdk8u" "jdk11u" "jdk17u" "jdk21" "jdk")
buildFile="/tmp/build.txt"
buildJobFile="/tmp/build_jobs.txt"
buildLinksFile="/tmp/build_links.txt"
excludedKeywords=("SmokeTests" "hotspot" "corretto" "bisheng" "dragonwell" "openj9")

if [[ -f ${buildFile} ]]; then
echo "Removing previous ${buildFile} ${buildJobFile} files"
echo "Removing previous ${buildFile} ${buildJobFile} ${buildLinksFile} files"
rm ${buildFile}
rm ${buildJobFile}
rm ${buildLinksFile}
fi

for i in ${allPlatforms[@]}; do
for i in ${allJdkVersions[@]}; do
curl -s "https://ci.adoptium.net/job/build-scripts/job/jobs/job/${i}/" | egrep -o "job/${i}-[^\/]+" >> ${buildJobFile}
done

Expand All @@ -26,31 +28,46 @@ done
echo "This will take a few minutes to complete."
# Header row
echo -n "| Platform |" > ${buildFile}
for p in ${allPlatforms[@]}; do
echo -n " ${p} |" | sed -e 's/jdk/Java /;s/u//;s/ / HEAD/' >> ${buildFile}
for jdkVersionX in ${allJdkVersions[@]}; do
echo -n " ${jdkVersionX} |" | sed -e 's/jdk/Java /;s/u//;s/ / HEAD /' >> ${buildFile}
done
# Delimiter row
echo -n $'\n|------' >> ${buildFile} # to match Platform column
for i in ${allPlatforms[@]}; do
for i in ${allJdkVersions[@]}; do
echo -n "|----" >> ${buildFile}
done
echo "|" >> ${buildFile}

# Prep buildLinksFile
echo "" >> ${buildLinksFile}

rowNum=1

cat ${buildJobFile}| cut -d'/' -f2 | sed -r 's/jdk[0-9]*u?\-//g' | sort | uniq | while read buildName;
do
# buildName should be of the form: aix-ppc64-temurin
echo -n "| ${buildName} | " >> ${buildFile}
for i in ${allPlatforms[@]}; do
code=$(curl -L -s -o /dev/null -w "%{http_code}" "https://ci.adoptium.net/job/build-scripts/job/jobs/job/${i}/job/${i}-${buildName}")
colNum=1
for jdkVersionX in ${allJdkVersions[@]}; do
jenkinsJobName="${jdkVersionX}-${buildName}"
code=$(curl -L -s -o /dev/null -w "%{http_code}" "https://ci.adoptium.net/job/build-scripts/job/jobs/job/${jdkVersionX}/job/${jenkinsJobName}")
if [[ ${code} = 200 ]]; then
echo -n "[![Build Status](https://ci.adoptium.net/buildStatus/icon?job=build-scripts/jobs/${i}/${i}-${buildName})](https://ci.adoptium.net/job/build-scripts/job/jobs/job/${i}/job/${i}-${buildName})" >> "/tmp/build.txt"
echo -n "[![Build Status][i-r${rowNum}c${colNum}]](j-r${rowNum}c${colNum})" >> ${buildFile}
echo "[i-r${rowNum}c${colNum}]: https://ci.adoptium.net/buildStatus/icon?job=build-scripts/jobs/${jdkVersionX}/${jenkinsJobName}" >> ${buildLinksFile}
echo "[j-r${rowNum}c${colNum}]: https://ci.adoptium.net/job/build-scripts/job/jobs/job/${jdkVersionX}/job/${jenkinsJobName}" >> ${buildLinksFile}
else
echo -n "N/A" >> ${buildFile}
fi

echo -n " | " >> ${buildFile}
((++colNum))
done
echo "" >> ${buildFile}
((++rowNum))
done

cat ${buildLinksFile} >> ${buildFile}

rm ${buildJobFile}
rm ${buildLinksFile}

echo "Complete - markdown out has been generated in ${buildFile}"
8 changes: 4 additions & 4 deletions pipelines/build/common/build_base_file.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -719,7 +719,7 @@ class Builder implements Serializable {
e.g:
nightly: build-scripts/jobs/jdk11u/jdk11u-linux-aarch64-temurin
evaluation: build-scripts/jobs/evaluation/jobs/jdk17u/jdk17u-evaluation-mac-x64-openj9
release: build-scripts/jobs/release/jobs/jdk20/jdk20-release-aix-ppc64-temurin
release: build-scripts/jobs/release/jobs/jdk21/jdk21-release-aix-ppc64-temurin
*/
def getJobFolder() {
def parentDir = currentBuild.fullProjectName.substring(0, currentBuild.fullProjectName.lastIndexOf('/'))
Expand Down Expand Up @@ -828,12 +828,12 @@ class Builder implements Serializable {
jobs[configuration.key] = {
IndividualBuildConfig config = configuration.value

// jdk20-linux-x64-temurin
// jdk21-linux-x64-temurin
def jobTopName = getJobName(configuration.key)
def jobFolder = getJobFolder()
/*
build-scripts/jobs/jdk20/jdk20-linux-x64-temurin for nightly
build-scripts/evaluation/jobs/jdk20/jdk20-evaluation-linux-aarch64-hotspot for evaluation
build-scripts/jobs/jdk21/jdk21-linux-x64-temurin for nightly
build-scripts/evaluation/jobs/jdk21/jdk21-evaluation-linux-aarch64-hotspot for evaluation
*/
def downstreamJobName = "${jobFolder}/${jobTopName}"
context.echo 'build name ' + downstreamJobName
Expand Down
4 changes: 2 additions & 2 deletions pipelines/build/prTester/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,8 @@ If you're unsure if the tests failed because of your changes or not, check our [

Simiar to `run tests` but runs a subset of jdk test jobs. Without specific jdk version, it uses 17, otherwise loops over given versions
Example:
`run tests quick` is the same as `run tests quick 20`
`run tests quick 11, 20, 8` generates all jobs then runs openjdk pipeline on 8, 11 and 20
`run tests quick` is the same as `run tests quick 21`
`run tests quick 11, 21, 8` generates all jobs then runs openjdk pipeline on 8, 11 and 21

##### `add to whitelist`

Expand Down
4 changes: 2 additions & 2 deletions pipelines/build/prTester/pr_test_pipeline.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ class PullRequestTestPipeline implements Serializable {
run tests run all version from $javaVersions
run tests quick run jdk17
run tests quick 8 run jdk8
run tests quick 11,17,20 run jdk11, 17 and 20
run tests quick 11,17,21 run jdk11, 17, and 21
*/
String[] commentsList = context.params.ghprbCommentBody.trim().split('run tests quick')
switch (commentsList.size()) {
Expand Down Expand Up @@ -208,7 +208,7 @@ Map<String, ?> defaultTestConfigurations = [
]
]

List<Integer> defaultJavaVersions = [8, 11, 17, 20]
List<Integer> defaultJavaVersions = [8, 11, 17, 21]

return {
String branch,
Expand Down
2 changes: 1 addition & 1 deletion pipelines/build/regeneration/build_job_generator.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ limitations under the License.
- build-scripts/jobs/jdk11u/jdk11u-linux-arm-temurin (jobType = "nightly")
- build-scripts/jobs/jdk11u/evaluation-jdk11u-linux-arm-temurin (when jobType = "evaluation")
- build-scripts/release/jobs/release-jdk17u-mac-x64-temurin (when jobType = "release")
- build-scripts-pr-tester/build-test/jobs/jdk20/jdk20-alpine-linux-x64-temurin (when "pr-tester")
- build-scripts-pr-tester/build-test/jobs/jdk21/jdk21-alpine-linux-x64-temurin (when "pr-tester")
*/

String javaVersion = params.JAVA_VERSION
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ node('worker') {
}

timestamps {
def retiredVersions = [9, 10, 12, 13, 14, 15, 16, 18, 19]
def retiredVersions = [9, 10, 12, 13, 14, 15, 16, 18, 19, 20]
def generatedPipelines = []

// Load git url and branch and gitBranch. These determine where we will be pulling user configs from.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ node('worker') {
}

timestamps {
def retiredVersions = [9, 10, 12, 13, 14, 15, 16, 18, 19]
def retiredVersions = [9, 10, 12, 13, 14, 15, 16, 18, 19, 20]
def generatedPipelines = []

// Load git url and branch and gitBranch. These determine where we will be pulling user configs from.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ file used as jenkinsfile to generator official release pipeline
*/

// ensure releaseVersions is updated before create releaseTag
def releaseVersions = [8,11,17,20]
def releaseVersions = [8,11,17,21]


// Regenerate release-openjdkX-pipeline per each jdk version listed in releaseVersions
Expand Down
2 changes: 2 additions & 0 deletions pipelines/jobs/configurations/jdk20u.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -46,4 +46,6 @@ weekly_release_scmReferences = [
'dragonwell' : ''
]

disableJob = true

return this
4 changes: 2 additions & 2 deletions tools/nightly_build_and_test_stats.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,12 @@ node('worker') {
def trssUrl = "${params.TRSS_URL}"
def apiUrl = "${params.API_URL}"
def slackChannel = "${params.SLACK_CHANNEL}"
def featureReleases = [ 8, 11, 17, 20, 21 ] // Consider making those parameters
def featureReleases = [ 8, 11, 17, 21 ] // Consider making those parameters
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

def healthStatus = [ 'jdk8': null, 'jdk11': null, 'jdk17': null, 'jdk20': null, 'jdk21': null ]
def healthStatus = [ 'jdk8': null, 'jdk11': null, 'jdk17': null, 'jdk21': null ]
def testStats = []

stage('getPipelineStatus') {
Expand Down