diff --git a/pipelines/build/common/build_base_file.groovy b/pipelines/build/common/build_base_file.groovy index 8876416c6..6406b0b42 100644 --- a/pipelines/build/common/build_base_file.groovy +++ b/pipelines/build/common/build_base_file.groovy @@ -191,6 +191,7 @@ class Builder implements Serializable { RELEASE: release, WEEKLY: isWeekly, PUBLISH_NAME: publishName, + OPENJCEPLUS_BRANCH: openjceplusBranch, ADOPT_BUILD_NUMBER: adoptBuildNumber, ENABLE_REPRODUCIBLE_COMPARE: enableReproducibleCompare, ENABLE_TESTS: enableTests, @@ -1268,6 +1269,7 @@ return { String aqaReference, String aqaAutoGen, String overridePublishName, + String overrideOpenJCEPlusBranch, String useAdoptShellScripts, String additionalConfigureArgs, def scmVars, @@ -1308,6 +1310,11 @@ return { } } + String openjceplusBranch = '' + if (overrideOpenJCEPlusBranch) { + openjceplusBranch = overrideOpenJCEPlusBranch + } + def buildsExcludeDocker = [:] if (dockerExcludes != '' && dockerExcludes != null) { buildsExcludeDocker = new JsonSlurper().parseText(dockerExcludes) as Map diff --git a/pipelines/build/common/config_regeneration.groovy b/pipelines/build/common/config_regeneration.groovy index 40b841368..910eb1e87 100644 --- a/pipelines/build/common/config_regeneration.groovy +++ b/pipelines/build/common/config_regeneration.groovy @@ -487,6 +487,7 @@ class Regeneration implements Serializable { RELEASE: false, WEEKLY: false, PUBLISH_NAME: '', + OPENJCEPLUS_BRANCH: '', ADOPT_BUILD_NUMBER: '', ENABLE_REPRODUCIBLE_COMPARE: enableReproducibleCompare, ENABLE_TESTS: DEFAULTS_JSON['testDetails']['enableTests'] as Boolean, diff --git a/pipelines/build/common/create_job_from_template.groovy b/pipelines/build/common/create_job_from_template.groovy index acec93ba1..ed16bbdbb 100644 --- a/pipelines/build/common/create_job_from_template.groovy +++ b/pipelines/build/common/create_job_from_template.groovy @@ -181,6 +181,7 @@ pipelineJob("$buildFolder/$JOB_NAME") {
USE_ADOPT_SHELL_SCRIPTS
Use Adopt's make-adopt-build-farm.sh and other bash scripts
RELEASE
Is this build a release
PUBLISH_NAME
Set name of publish
+
OPENJCEPLUS_BRANCH
Explicitly set name of the OpenJCEPlus branch to checkout
ADOPT_BUILD_NUMBER
Adopt build number
ENABLE_REPRODUCIBLE_COMPARE
Run reproducible compare build
ENABLE_TESTS
Run tests
diff --git a/pipelines/build/common/openjdk_build_pipeline.groovy b/pipelines/build/common/openjdk_build_pipeline.groovy index 0377b7921..59d29bf84 100644 --- a/pipelines/build/common/openjdk_build_pipeline.groovy +++ b/pipelines/build/common/openjdk_build_pipeline.groovy @@ -2052,7 +2052,17 @@ class Build { } def javaVersion = getJavaVersionNumber() if (!DEFAULTS_JSON['exclude-openjceplus'].contains(javaVersion)) { - openjceplusBuildArgs += '--bundle-openjceplus' + def openjceplusBranch = "semeru-java" + javaVersion.toString() + if (buildConfig.RELEASE) { + try { + def branchSuffix = (buildConfig.PUBLISH_NAME =~ /jdk-([0-9]+(\.[0-9]+){0,3})\+.*/)[ 0 ][ 1 ] + openjceplusBranch = "semeru-java-" + branchSuffix + } catch (IndexOutOfBoundsException e) { + context.println "WARNING: OpenJCEPlus Branch cannot be determined based on PUBLISH_NAME. Using default branch: ${openjceplusBranch}" + } + } + context.println "OpenJCEPlus Branch: $openjceplusBranch" + openjceplusBuildArgs += "--bundle-openjceplus --openjceplus-branch ${openjceplusBranch}" } context.withEnv(['BUILD_ARGS=' + openjceplusBuildArgs]) { diff --git a/pipelines/build/common/trigger_beta_build.groovy b/pipelines/build/common/trigger_beta_build.groovy index a6e6e592e..bd51c7477 100644 --- a/pipelines/build/common/trigger_beta_build.groovy +++ b/pipelines/build/common/trigger_beta_build.groovy @@ -245,6 +245,7 @@ if (triggerMainBuild || triggerEvaluationBuild) { string(name: 'releaseType', value: "Weekly"), string(name: 'scmReference', value: "$latestAdoptTag"), string(name: 'overridePublishName', value: "$publishJobTag"), + string(name: 'overrideOpenJCEPlusBranch', value: "$openjceplusBranch"), booleanParam(name: 'aqaAutoGen', value: true), booleanParam(name: 'enableTests', value: enableTesting), string(name: 'additionalConfigureArgs', value: "$additionalConfigureArgs") diff --git a/pipelines/build/openjdk_pipeline.groovy b/pipelines/build/openjdk_pipeline.groovy index 04674f462..0ec470670 100644 --- a/pipelines/build/openjdk_pipeline.groovy +++ b/pipelines/build/openjdk_pipeline.groovy @@ -213,6 +213,7 @@ if (scmVars != null || configureBuild != null || buildConfigurations != null) { aqaReference, aqaAutoGen, overridePublishName, + overrideOpenJCEPlusBranch, useAdoptBashScripts, additionalConfigureArgs, scmVars, diff --git a/pipelines/jobs/pipeline_job_template.groovy b/pipelines/jobs/pipeline_job_template.groovy index 9f6f5ddd9..de1d6615e 100644 --- a/pipelines/jobs/pipeline_job_template.groovy +++ b/pipelines/jobs/pipeline_job_template.groovy @@ -158,6 +158,7 @@ pipelineJob("${BUILD_FOLDER}/${JOB_NAME}") { stringParam('buildConfigFilePath', '', "Relative path to where the jdkxx_pipeline_config.groovy file is located. It contains the build configurations for each platform, architecture and variant.
Default: ${defaultsJson['configDirectories']['build']}/jdkxx_pipeline_config.groovy") choiceParam('releaseType', [jobReleaseType, 'Nightly', 'Nightly Without Publish', 'Weekly', 'Weekly Without Publish', 'Release'].unique(), 'Nightly - release a standard nightly build.
Nightly Without Publish - run a nightly but do not publish.
Weekly - release a standard weekly build, run with extended tests.
Weekly Without Publish - run a weekly but do not publish.
Release - this is a release, this will need to be manually promoted.') stringParam('overridePublishName', '', 'REQUIRED for OpenJ9: Name that determines the publish name (and is used by the meta-data file), defaults to scmReference(minus _adopt if present).
Nightly builds: Leave blank (defaults to a date_time stamp).
OpenJ9 Release build Java 8 example jdk8u192-b12_openj9-0.12.1 and for OpenJ9 Java 11 example jdk-11.0.2+9_openj9-0.12.1.') + stringParam('overrideOpenJCEPlusBranch', '', 'Optional for OpenJ9: Ovveride the naming convention of the OpenJCEPlus Branch to checkout, defaults to semeru-java for non-releases and semeru-java- for releases.
Nightly builds: Leave blank (defaults to a date_time stamp).
OpenJ9 Release build Java 8 example jdk8u192-b12_openj9-0.12.1 and for OpenJ9 Java 11 example jdk-11.0.2+9_openj9-0.12.1.') stringParam('scmReference', '', 'Tag name or Branch name from which openjdk source code repo to build. Nightly builds: Defaults to, Hotspot=dev, OpenJ9=openj9, others=master.
Release builds: For hotspot JDK8 this would be the OpenJDK tag, for hotspot JDK11+ this would be the Adopt merge tag for the desired OpenJDK tag eg.jdk-11.0.4+10_adopt, and for OpenJ9 this will be the release branch, eg.openj9-0.14.0.') stringParam('buildReference', '', 'SHA1 or Tag name or Branch name of temurin-build repo. Defaults to master') stringParam('ciReference', '', 'SHA1 or Tag name or Branch name of ci-jenkins-pipeline repo. Defaults to master') diff --git a/pipelines/jobs/release_pipeline_job_template.groovy b/pipelines/jobs/release_pipeline_job_template.groovy index fe0450e1d..b717c0641 100644 --- a/pipelines/jobs/release_pipeline_job_template.groovy +++ b/pipelines/jobs/release_pipeline_job_template.groovy @@ -122,6 +122,7 @@ pipelineJob("${BUILD_FOLDER}/${JOB_NAME}") { stringParam('helperReference', releaseTag, 'Tag name or Branch name of jenkins-helper repo. Defaults to master') stringParam('aqaReference', aqaTag, 'Tag name or Branch name of aqa-tests. Defaults to master') stringParam('overridePublishName', '', 'Specify a different scmReference tag when doing the actual Publish, eg.for OpenJ9') + stringParam('overrideOpenJCEPlusBranch', '', 'Specify a different OpenJCEPlus Branch name') stringParam('additionalConfigureArgs', '', "Additional arguments that will be ultimately passed to OpenJDK's ./configure. jdk8 might have a different one!") // default value not matter for release diff --git a/pipelines/library/src/common/IndividualBuildConfig.groovy b/pipelines/library/src/common/IndividualBuildConfig.groovy index e30027752..aed52d015 100644 --- a/pipelines/library/src/common/IndividualBuildConfig.groovy +++ b/pipelines/library/src/common/IndividualBuildConfig.groovy @@ -33,6 +33,7 @@ class IndividualBuildConfig implements Serializable { final String JDK_BOOT_VERSION final boolean RELEASE final String PUBLISH_NAME + final String OPENJCEPLUS_BRANCH final String ADOPT_BUILD_NUMBER final boolean ENABLE_TESTS final boolean ENABLE_TESTDYNAMICPARALLEL @@ -98,6 +99,7 @@ class IndividualBuildConfig implements Serializable { JDK_BOOT_VERSION = map.get("JDK_BOOT_VERSION") != null ? map.get("JDK_BOOT_VERSION").trim() : null RELEASE = map.get("RELEASE") PUBLISH_NAME = map.get("PUBLISH_NAME") != null ? map.get("PUBLISH_NAME").trim() : null + OPENJCEPLUS_BRANCH = map.get("OPENJCEPLUS_BRANCH") != null ? map.get("OPENJCEPLUS_BRANCH").trim() : null ADOPT_BUILD_NUMBER = map.get("ADOPT_BUILD_NUMBER") != null ? map.get("ADOPT_BUILD_NUMBER").trim() : null ENABLE_TESTS = map.get("ENABLE_TESTS") ENABLE_TESTDYNAMICPARALLEL = map.get("ENABLE_TESTDYNAMICPARALLEL") @@ -154,6 +156,7 @@ class IndividualBuildConfig implements Serializable { JDK_BOOT_VERSION : JDK_BOOT_VERSION, RELEASE : RELEASE, PUBLISH_NAME : PUBLISH_NAME, + OPENJCEPLUS_BRANCH : OPENJCEPLUS_BRANCH, ADOPT_BUILD_NUMBER : ADOPT_BUILD_NUMBER, ENABLE_TESTS : ENABLE_TESTS, ENABLE_TESTDYNAMICPARALLEL: ENABLE_TESTDYNAMICPARALLEL, diff --git a/pipelines/src/test/groovy/IndividualBuildConfigTest.groovy b/pipelines/src/test/groovy/IndividualBuildConfigTest.groovy index 14c43c1b3..e5ad76191 100644 --- a/pipelines/src/test/groovy/IndividualBuildConfigTest.groovy +++ b/pipelines/src/test/groovy/IndividualBuildConfigTest.groovy @@ -45,6 +45,7 @@ class IndividualBuildConfigTest { RELEASE : false, WEEKLY : false, PUBLISH_NAME : 'm', + OPENJCEPLUS_BRANCH : 'aa', ADOPT_BUILD_NUMBER : 'n', ENABLE_TESTS : true, ENABLE_INSTALLERS : true,