-
-
Notifications
You must be signed in to change notification settings - Fork 256
Setting up new build jobs, mirrors,... when a new openjdk version is branched from jdk(head)
When a new jdk release is created upstream eg.jdk-23, a new upstream branch is branched from jdk(head) master, so https://github.com/openjdk/jdk branch jdk23
. We then mirror this new branch in the jdk(head) mirror repository, https://github.com/adoptium/jdk.
Once shipped upstream moves to development of updates for the following .0.N updates, this is done in a new repro https://github.com/openjdk/jdk19u, known as the "updates" repo. We need to create a new mirror for this "updates" repo after the initial release has been shipped.
Prerequistes:
- Write access to be able to push to the Adoptium mirror repositories (permission group ???).
- Access to Jenkins utils jobs which generate the pipelines: https://ci.adoptopenjdk.net/job/build-scripts/job/utils/
Update the jdk(head) adoptium mirror to mirror the new jdkNN version branch - Scenario 1 (non-u
repository)
- Edit the existing adoptium mirror Jenkins job configuration "shell script": https://ci.adoptium.net/view/git-mirrors/job/git-mirrors/job/adoptium/job/git-skara-jdk/configure, "Build Steps" - "Execute shell" content. Update the "branches" variable to have the new jdkNN version branch to be mirrored:
branches="master jdk23 jdkNN"
- Save, and run the update job to mirror the new jdkNN version branch.
- Create the new mirror jdkNNu repository using otterdog: https://github.com/adoptium/.eclipsefdn Create a new PR for file https://github.com/adoptium/.eclipsefdn/blob/main/otterdog/adoptium.jsonnet and add a definition like this is we're add a
u
repository:
newMirrorRepo('jdkNNu') {},
Also note that that after the mirror is created it can take up to three hours for the permissions to start working if you need to do it manually.
Steps 2-5 are no longer required to be run manually and the first run of the skara mirror jobs will populate the repository
- Once the new repository has been created, populate it with a mirror of the existing adoptium one (
u
release):
git clone --mirror [email protected]:openjdk/jdkNN[u].git
cd jdkNN[u].git
git push --mirror [email protected]:adoptium/jdkNN[u].git
Ignore any errors attempting to push to branch "main". Verify repository populated successfully with branch "master".
-
Delete any upstream "pr/nn" branches (There typically shouldn't be any for a new
u
release as we will have removed them in the non-u mirror_. -
Create the "dev" branch with necessary patches:
git checkout -b dev origin/master
Apply "Adoptium" patches, "Files changed" => https://github.com/adoptium/jdk/compare/master...dev
Commit changes and push:
git push origin dev
- Create the "release" branch with necessary patches:
git checkout -b release origin/master
Apply "Adoptium" patches, "Files changed" => https://github.com/adoptium/jdk/compare/master...release. This should include, as a minimum, the mandatory README.JAVASE
file.
Commit changes and push:
git push origin release
- Create the skara mirror job:
- Duplicate an existing job from within : https://ci.adoptium.net/view/git-mirrors/job/git-mirrors/job/adoptium (typically git-skara-jdk)
- Name git-skara-jdkNN[u], also edit Build->Execute shell command to call:
bash ./skaraMirror.sh jdkNN[u]
This can also be done manually by running the script after cloning https://github.com/adoptium/mirror-scripts
-
Build the new git-skara-jdkNN[u] job. It should now mirror any new upstream openjdk commits to master, merge with dev, and create the release branch. Verify the job completes successfully and the repository content looks correct. The first time you run it you may get a message
fatal: no such branch/commit 'master'
- this should go away on the next run . -
If "main" branch was auto-created as "default" branch: Raise an Eclipse Help Desk issue to change the "default" branch to "master", and to delete the "main" branch.
- Does https://github.com/adoptium/temurinNN-binaries exist (You may have created one in the same PR when you created the source code mirror)
- If not create using "otterdog": https://github.com/adoptium/.eclipsefdn Create a new PR for file https://github.com/adoptium/.eclipsefdn/blob/main/otterdog/adoptium.jsonnet and add a definition like:
newBinaryRepo('temurin24-binaries') {},
- Contact the TRSS owner (Shelley Lambert), to update the TRSS configuration to add the following new build pipelines:
- openjdkNN-pipeline
- release-openjdkNN-pipeline
- Create the new jdkNN head pipeline config, eg:https://github.com/adoptium/ci-jenkins-pipelines/pull/859/files
- Create jdkNN.groovy
- Create jdkNN_evaluation.groovy
- Create jdkNN_release.groovy
- Create jdkNN_pipeline_config.groovy
- Create PR and merge
- Update JAVA_VERSION in build job generator https://ci.adoptium.net/job/build-scripts/job/utils/job/pipeline_jobs_generator_jdk/ to the new jdk version
- Run the updated pipeline_jobs_generator_jdk
- Run the build-pipeline-generator to generate the openjdkNN-pipeline
- Repeat for the evaluation_pipeline_jobs_generator as well:
- Update JAVA_VERSION in evaluation-pipeline_jobs_generator_jdk to new jdk version
- Run the updated evaluation-pipeline_jobs_generator_jdk
- For the previous jdkNN head version create the pipeline(& evaluation-)_jobs_generator_jdk(NN-1)
- Create a new job based on the "pipeline_jobs_generator_jdk" called "pipeline_jobs_generator_jdk(NN-1)", and change the JAVA_VERSION to "jdk(NN-1)"
- Create a new job based on the "evaluation-pipeline_jobs_generator_jdk" called "evaluation-pipeline_jobs_generator_jdk(NN-1)", and change the JAVA_VERSION to "jdk(NN-1)"
- For
u
version, jdkNN->jdkNNu, create the jdkNNu pipeline job configuration: https://github.com/adoptium/ci-jenkins-pipelines/tree/master/pipelines/jobs/configurations, using the previous jdkNN version file contents as a basis:
- Rename jdkNN.groovy to jdkNNu.groovy
- Rename jdkNN_evaluation.groovy to jdkNNu_evaluation.groovy
- Rename jdkNN_release.groovy to jdkNNu_release.groovy
- Rename jdkNN_pipeline_config.groovy to jdkNNu_pipeline_config.groovy
- Create PR and merge
- For
u
version, jdkNN->jdkNNu, rename existing job: eg.https://ci.adoptopenjdk.net/job/build-scripts/job/utils/job/pipeline_jobs_generator_jdkNN to pipeline_jobs_generator_jdkNNu - For new branch head version, copy an existing generator, eg.pipeline_jobs_generator_jdk(NN-1)u, and create as pipeline_jobs_generator_jdkNN
- Change JAVA_VERSION parameter to "jdkNN[u]"
- Build the pipeline_jobs_generator_jdkNN[u] job, and ensure the new pipeline build jobs are created: https://ci.adoptopenjdk.net/job/build-scripts/job/jobs/
- Repeat for the evaluation_ and release_ pipeline_jobs_generators as well.
- Build the newly generate pipeline job : https://ci.adoptopenjdk.net/job/build-scripts/job/openjdkNN-pipeline/
- Verify all build successfully
- Go to Configure for job https://ci.adoptopenjdk.net/job/build-scripts/job/release/job/refactor_openjdk_release_tool/ and add the new jdk head to the VERSION choices parameter
- Go to Configure for job https://ci.adoptium.net/view/Tooling/job/nightlyBuildAndTestStats_temurin/configure
- For Add or Update to
u
"jdkNN[u]" in FEATURE_RELEASES - Update TIP_RELEASES with new "head" jdkNN versions
If we have created a mirror for a new major release, it will need a release trigger job to be able to detect and build new tags, which we build and ship early access builds from.
The jobs which run these builds are in the utils folder on jenkins and are named releaseTrigger_XXea
.
- If you are transitioning from a non-
u
(jdk(head) version branch) to au
updates repository, then you can simply update theMIRROR_REPO
reference in the job from thejdk
(head) repository to the newjdkNNu
updates mirror repository. Do NOT add theu
to theJAVA_VERSION
parameter. The binaries repository will be unchanged as it never has theu
suffix in the name. - If you are creating a new major non-
u
version, then you should create a copy of the old releaseTrigger jobs with the new version number, and then update all references to the old version to the new one, including the temurin-binariesNN repository.