-
-
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-21, a new upstream repo is branch from jdk(head), so https://github.com/openjdk/jdk21. We then mirror this new repository to https://github.com/adoptium/jdk21.
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: https://ci.adoptopenjdk.net/job/build-scripts/job/utils/
- Create the new mirror jdkNN 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') {},
Or for a non-u repository:
newMirrorRepo('jdkNN') {},
You can also use the same otterdog PR to create the new binaries repository in the second case - see the example piece of code later in the file.
- Once the new repository has been created, populate it with a mirror of either the upstream openjdk repository (non-
u
release) or 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
or
git clone --bare https://github.com/adoptium/jdkNN
cd jdkNN.git
git push --mirror [email protected]:adoptium/jdkNNu.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_. -
For a non-
u
release: Clone the new adoptium repo:
git clone [email protected]:adoptium/jdkNN[u].git
- For a non-
u
release: 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
- For a non-
u
release, 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 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.
-
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:
orgs.newRepo('temurin21-binaries') {
allow_merge_commit: true,
allow_update_branch: false,
delete_branch_on_merge: false,
dependabot_security_updates_enabled: true,
description: "Temurin 21 binaries",
has_issues: false,
web_commit_signoff_required: false,
},
- Create README.md based on https://github.com/adoptium/temurin17-binaries/README.md
- Create the new jdkNN head pipeline config, eg:https://github.com/adoptium/ci-jenkins-pipelines/pull/720
- 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
- Repeat for the evaluation_pipeline_jobs_generator as well.
- Repeat for the release_pipeline_jobs_generator as well.
- Create the pipeline job configuration: https://github.com/adoptium/ci-jenkins-pipelines/tree/master/pipelines/jobs/configurations , using the previous version file contents as a basis:
- Create jdkNN.groovy
- Create jdkNN_pipeline_config.groovy
- Create PR and merge
- Duplicate an existing job: https://ci.adoptopenjdk.net/job/build-scripts/job/utils/job/pipeline_jobs_generator_jdk17u/ and name pipeline_jobs_generator_jdkNN
- Change JAVA_VERSION parameter to "jdkNN"
- Build the pipeline_jobs_generator_jdkNN 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
- Add "jdkNN" to FEATURE_RELEASES
- Update TIP_RELEASE with new "head" version
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
to au
repository, then you can simply update theMIRROR_REPO
reference in the job to thejdkNN
repository tojdkNNu
. The binaries repository will be unchanged. - 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.