chore: allow to differenciate JDKs to build depending on Jenkins release line#2178
Conversation
| @@ -117,16 +117,12 @@ stage('Build') { | |||
|
|
|||
| if (!infra.isTrusted()) { | |||
| def images = [ | |||
This comment was marked as resolved.
This comment was marked as resolved.
Sorry, something went wrong.
There was a problem hiding this comment.
Note: to be really strict, there should be a map for Weekly images, and another with LTS images to get a proper exhaustive simulated LTS build on ci.jenkins.io in all cases.
But since that diff (no simulated jdk17 LTS) would only occur when manually replaying a simulated build and while weekly and LTS don't have the same list of JDKs, I didn't bother.
There was a problem hiding this comment.
This new comment could also be extracted in another PR if needed as not directly related to this feature.
timja
left a comment
There was a problem hiding this comment.
Brilliant we've wanted this for awhile, previously we've used a hacky LTS branch I think
|
Just missing that part for Windows to also benefit from this mechanism, cf #2121 (comment)
|
This reverts commit fe77aa7, extracted to jenkinsci#2184
There was a problem hiding this comment.
LGTM, except maybe the title which should be a chore since you've split the JDK17 removal to another PR (e.g. in the current state - 046147d being the lats commit - this PR does not introduce any change in the image delivered on Tuesday / LTS release days to end users).
I've changed the labels (for release drafter) but I let you change the title before merging to avoid pondering with the squash merge feature.
This PR allows to differenciate JDKs to build depending on Jenkins release line, to allow publishing both Weekly and LTS from the same source code even when their JDK requirements diverge for a while during JDK depreciations in Jenkins Core.
It also removes JDK17 from the JDKs to build for the Weekly releasesas 2.545 now requires JDK21 while the incoming LTS 2.541.1 won't.EDIT: in a follow-up PR, different concern, see #2178 (comment)
Refs:
Testing done
make buildmake show
{ "group": { "alpine": { "targets": [ "alpine_jdk21", "alpine_jdk25" ] }, "debian": { "targets": [ "debian_jdk21", "debian_jdk25", "debian-slim_jdk21", "debian-slim_jdk25" ] }, "default": { "targets": [ "linux" ] }, "linux": { "targets": [ "alpine", "debian", "rhel" ] }, "rhel": { "targets": [ "rhel_jdk21", "rhel_jdk25" ] } }, "target": { "alpine_jdk21": { "context": ".", "dockerfile": "alpine/hotspot/Dockerfile", "args": { "ALPINE_TAG": "3.23.2", "COMMIT_SHA": "c23ccd0d689b05f8110b0d857da9fd64046b8fb4", "JAVA_VERSION": "21.0.9_10", "JENKINS_VERSION": "2.534", "PLUGIN_CLI_VERSION": "2.13.2", "WAR_SHA": "fcf13a8ebbe69d678608cc4b3885ece7d7e697d6da4c3691025a06968ddef228", "WAR_URL": "https://get.jenkins.io/war/2.534/jenkins.war" }, "tags": [ "docker.io/jenkins/jenkins:2.534-alpine-jdk21", "docker.io/jenkins/jenkins:2.534-alpine" ], "platforms": [ "linux/amd64", "linux/arm64" ], "output": [ { "type": "docker" } ] }, "alpine_jdk25": { "context": ".", "dockerfile": "alpine/hotspot/Dockerfile", "args": { "ALPINE_TAG": "3.23.2", "COMMIT_SHA": "c23ccd0d689b05f8110b0d857da9fd64046b8fb4", "JAVA_VERSION": "25.0.1_8", "JENKINS_VERSION": "2.534", "PLUGIN_CLI_VERSION": "2.13.2", "WAR_SHA": "fcf13a8ebbe69d678608cc4b3885ece7d7e697d6da4c3691025a06968ddef228", "WAR_URL": "https://get.jenkins.io/war/2.534/jenkins.war" }, "tags": [ "docker.io/jenkins/jenkins:2.534-alpine-jdk25" ], "platforms": [ "linux/amd64", "linux/arm64" ], "output": [ { "type": "docker" } ] }, "debian-slim_jdk21": { "context": ".", "dockerfile": "debian/Dockerfile", "args": { "COMMIT_SHA": "c23ccd0d689b05f8110b0d857da9fd64046b8fb4", "DEBIAN_RELEASE_LINE": "trixie", "DEBIAN_VARIANT": "-slim", "DEBIAN_VERSION": "20251117", "JAVA_VERSION": "21.0.9_10", "JENKINS_VERSION": "2.534", "PLUGIN_CLI_VERSION": "2.13.2", "WAR_SHA": "fcf13a8ebbe69d678608cc4b3885ece7d7e697d6da4c3691025a06968ddef228", "WAR_URL": "https://get.jenkins.io/war/2.534/jenkins.war" }, "tags": [ "docker.io/jenkins/jenkins:2.534-slim-jdk21", "docker.io/jenkins/jenkins:2.534-slim" ], "platforms": [ "linux/amd64", "linux/arm64" ], "output": [ { "type": "docker" } ] }, "debian-slim_jdk25": { "context": ".", "dockerfile": "debian/Dockerfile", "args": { "COMMIT_SHA": "c23ccd0d689b05f8110b0d857da9fd64046b8fb4", "DEBIAN_RELEASE_LINE": "trixie", "DEBIAN_VARIANT": "-slim", "DEBIAN_VERSION": "20251117", "JAVA_VERSION": "25.0.1_8", "JENKINS_VERSION": "2.534", "PLUGIN_CLI_VERSION": "2.13.2", "WAR_SHA": "fcf13a8ebbe69d678608cc4b3885ece7d7e697d6da4c3691025a06968ddef228", "WAR_URL": "https://get.jenkins.io/war/2.534/jenkins.war" }, "tags": [ "docker.io/jenkins/jenkins:2.534-slim-jdk25" ], "platforms": [ "linux/amd64", "linux/arm64" ], "output": [ { "type": "docker" } ] }, "debian_jdk21": { "context": ".", "dockerfile": "debian/Dockerfile", "args": { "COMMIT_SHA": "c23ccd0d689b05f8110b0d857da9fd64046b8fb4", "DEBIAN_RELEASE_LINE": "trixie", "DEBIAN_VARIANT": "", "DEBIAN_VERSION": "20251117", "JAVA_VERSION": "21.0.9_10", "JENKINS_VERSION": "2.534", "PLUGIN_CLI_VERSION": "2.13.2", "WAR_SHA": "fcf13a8ebbe69d678608cc4b3885ece7d7e697d6da4c3691025a06968ddef228", "WAR_URL": "https://get.jenkins.io/war/2.534/jenkins.war" }, "tags": [ "docker.io/jenkins/jenkins:2.534-jdk21", "docker.io/jenkins/jenkins:2.534" ], "platforms": [ "linux/amd64", "linux/arm64", "linux/s390x", "linux/ppc64le" ], "output": [ { "type": "docker" } ] }, "debian_jdk25": { "context": ".", "dockerfile": "debian/Dockerfile", "args": { "COMMIT_SHA": "c23ccd0d689b05f8110b0d857da9fd64046b8fb4", "DEBIAN_RELEASE_LINE": "trixie", "DEBIAN_VARIANT": "", "DEBIAN_VERSION": "20251117", "JAVA_VERSION": "25.0.1_8", "JENKINS_VERSION": "2.534", "PLUGIN_CLI_VERSION": "2.13.2", "WAR_SHA": "fcf13a8ebbe69d678608cc4b3885ece7d7e697d6da4c3691025a06968ddef228", "WAR_URL": "https://get.jenkins.io/war/2.534/jenkins.war" }, "tags": [ "docker.io/jenkins/jenkins:2.534-jdk25" ], "platforms": [ "linux/amd64", "linux/arm64", "linux/s390x", "linux/ppc64le" ], "output": [ { "type": "docker" } ] }, "rhel_jdk21": { "context": ".", "dockerfile": "rhel/Dockerfile", "args": { "COMMIT_SHA": "c23ccd0d689b05f8110b0d857da9fd64046b8fb4", "JAVA_VERSION": "21.0.9_10", "JENKINS_VERSION": "2.534", "PLUGIN_CLI_VERSION": "2.13.2", "RHEL_RELEASE_LINE": "ubi9", "RHEL_TAG": "9.7-1767674301", "WAR_SHA": "fcf13a8ebbe69d678608cc4b3885ece7d7e697d6da4c3691025a06968ddef228", "WAR_URL": "https://get.jenkins.io/war/2.534/jenkins.war" }, "tags": [ "docker.io/jenkins/jenkins:2.534-rhel-ubi9-jdk21" ], "platforms": [ "linux/amd64", "linux/arm64", "linux/ppc64le" ], "output": [ { "type": "docker" } ] }, "rhel_jdk25": { "context": ".", "dockerfile": "rhel/Dockerfile", "args": { "COMMIT_SHA": "c23ccd0d689b05f8110b0d857da9fd64046b8fb4", "JAVA_VERSION": "25.0.1_8", "JENKINS_VERSION": "2.534", "PLUGIN_CLI_VERSION": "2.13.2", "RHEL_RELEASE_LINE": "ubi9", "RHEL_TAG": "9.7-1767674301", "WAR_SHA": "fcf13a8ebbe69d678608cc4b3885ece7d7e697d6da4c3691025a06968ddef228", "WAR_URL": "https://get.jenkins.io/war/2.534/jenkins.war" }, "tags": [ "docker.io/jenkins/jenkins:2.534-rhel-ubi9-jdk25" ], "platforms": [ "linux/amd64", "linux/arm64", "linux/ppc64le" ], "output": [ { "type": "docker" } ] } } }JENKINS_VERSION=2.541.1 make show
{ "group": { "alpine": { "targets": [ "alpine_jdk17", "alpine_jdk21", "alpine_jdk25" ] }, "debian": { "targets": [ "debian_jdk17", "debian_jdk21", "debian_jdk25", "debian-slim_jdk17", "debian-slim_jdk21", "debian-slim_jdk25" ] }, "default": { "targets": [ "linux" ] }, "linux": { "targets": [ "alpine", "debian", "rhel" ] }, "rhel": { "targets": [ "rhel_jdk17", "rhel_jdk21", "rhel_jdk25" ] } }, "target": { "alpine_jdk17": { "context": ".", "dockerfile": "alpine/hotspot/Dockerfile", "args": { "ALPINE_TAG": "3.23.2", "COMMIT_SHA": "c23ccd0d689b05f8110b0d857da9fd64046b8fb4", "JAVA_VERSION": "17.0.17_10", "JENKINS_VERSION": "2.541.1", "PLUGIN_CLI_VERSION": "2.13.2", "WAR_SHA": "fcf13a8ebbe69d678608cc4b3885ece7d7e697d6da4c3691025a06968ddef228", "WAR_URL": "https://get.jenkins.io/war-stable/2.541.1/jenkins.war" }, "tags": [ "docker.io/jenkins/jenkins:2.541.1-alpine-jdk17" ], "platforms": [ "linux/amd64" ], "output": [ { "type": "docker" } ] }, "alpine_jdk21": { "context": ".", "dockerfile": "alpine/hotspot/Dockerfile", "args": { "ALPINE_TAG": "3.23.2", "COMMIT_SHA": "c23ccd0d689b05f8110b0d857da9fd64046b8fb4", "JAVA_VERSION": "21.0.9_10", "JENKINS_VERSION": "2.541.1", "PLUGIN_CLI_VERSION": "2.13.2", "WAR_SHA": "fcf13a8ebbe69d678608cc4b3885ece7d7e697d6da4c3691025a06968ddef228", "WAR_URL": "https://get.jenkins.io/war-stable/2.541.1/jenkins.war" }, "tags": [ "docker.io/jenkins/jenkins:2.541.1-alpine-jdk21", "docker.io/jenkins/jenkins:2.541.1-alpine" ], "platforms": [ "linux/amd64", "linux/arm64" ], "output": [ { "type": "docker" } ] }, "alpine_jdk25": { "context": ".", "dockerfile": "alpine/hotspot/Dockerfile", "args": { "ALPINE_TAG": "3.23.2", "COMMIT_SHA": "c23ccd0d689b05f8110b0d857da9fd64046b8fb4", "JAVA_VERSION": "25.0.1_8", "JENKINS_VERSION": "2.541.1", "PLUGIN_CLI_VERSION": "2.13.2", "WAR_SHA": "fcf13a8ebbe69d678608cc4b3885ece7d7e697d6da4c3691025a06968ddef228", "WAR_URL": "https://get.jenkins.io/war-stable/2.541.1/jenkins.war" }, "tags": [ "docker.io/jenkins/jenkins:2.541.1-alpine-jdk25" ], "platforms": [ "linux/amd64", "linux/arm64" ], "output": [ { "type": "docker" } ] }, "debian-slim_jdk17": { "context": ".", "dockerfile": "debian/Dockerfile", "args": { "COMMIT_SHA": "c23ccd0d689b05f8110b0d857da9fd64046b8fb4", "DEBIAN_RELEASE_LINE": "trixie", "DEBIAN_VARIANT": "-slim", "DEBIAN_VERSION": "20251117", "JAVA_VERSION": "17.0.17_10", "JENKINS_VERSION": "2.541.1", "PLUGIN_CLI_VERSION": "2.13.2", "WAR_SHA": "fcf13a8ebbe69d678608cc4b3885ece7d7e697d6da4c3691025a06968ddef228", "WAR_URL": "https://get.jenkins.io/war-stable/2.541.1/jenkins.war" }, "tags": [ "docker.io/jenkins/jenkins:2.541.1-slim-jdk17" ], "platforms": [ "linux/amd64" ], "output": [ { "type": "docker" } ] }, "debian-slim_jdk21": { "context": ".", "dockerfile": "debian/Dockerfile", "args": { "COMMIT_SHA": "c23ccd0d689b05f8110b0d857da9fd64046b8fb4", "DEBIAN_RELEASE_LINE": "trixie", "DEBIAN_VARIANT": "-slim", "DEBIAN_VERSION": "20251117", "JAVA_VERSION": "21.0.9_10", "JENKINS_VERSION": "2.541.1", "PLUGIN_CLI_VERSION": "2.13.2", "WAR_SHA": "fcf13a8ebbe69d678608cc4b3885ece7d7e697d6da4c3691025a06968ddef228", "WAR_URL": "https://get.jenkins.io/war-stable/2.541.1/jenkins.war" }, "tags": [ "docker.io/jenkins/jenkins:2.541.1-slim-jdk21", "docker.io/jenkins/jenkins:2.541.1-slim" ], "platforms": [ "linux/amd64", "linux/arm64" ], "output": [ { "type": "docker" } ] }, "debian-slim_jdk25": { "context": ".", "dockerfile": "debian/Dockerfile", "args": { "COMMIT_SHA": "c23ccd0d689b05f8110b0d857da9fd64046b8fb4", "DEBIAN_RELEASE_LINE": "trixie", "DEBIAN_VARIANT": "-slim", "DEBIAN_VERSION": "20251117", "JAVA_VERSION": "25.0.1_8", "JENKINS_VERSION": "2.541.1", "PLUGIN_CLI_VERSION": "2.13.2", "WAR_SHA": "fcf13a8ebbe69d678608cc4b3885ece7d7e697d6da4c3691025a06968ddef228", "WAR_URL": "https://get.jenkins.io/war-stable/2.541.1/jenkins.war" }, "tags": [ "docker.io/jenkins/jenkins:2.541.1-slim-jdk25" ], "platforms": [ "linux/amd64", "linux/arm64" ], "output": [ { "type": "docker" } ] }, "debian_jdk17": { "context": ".", "dockerfile": "debian/Dockerfile", "args": { "COMMIT_SHA": "c23ccd0d689b05f8110b0d857da9fd64046b8fb4", "DEBIAN_RELEASE_LINE": "trixie", "DEBIAN_VARIANT": "", "DEBIAN_VERSION": "20251117", "JAVA_VERSION": "17.0.17_10", "JENKINS_VERSION": "2.541.1", "PLUGIN_CLI_VERSION": "2.13.2", "WAR_SHA": "fcf13a8ebbe69d678608cc4b3885ece7d7e697d6da4c3691025a06968ddef228", "WAR_URL": "https://get.jenkins.io/war-stable/2.541.1/jenkins.war" }, "tags": [ "docker.io/jenkins/jenkins:2.541.1-jdk17" ], "platforms": [ "linux/amd64", "linux/arm64", "linux/s390x", "linux/ppc64le" ], "output": [ { "type": "docker" } ] }, "debian_jdk21": { "context": ".", "dockerfile": "debian/Dockerfile", "args": { "COMMIT_SHA": "c23ccd0d689b05f8110b0d857da9fd64046b8fb4", "DEBIAN_RELEASE_LINE": "trixie", "DEBIAN_VARIANT": "", "DEBIAN_VERSION": "20251117", "JAVA_VERSION": "21.0.9_10", "JENKINS_VERSION": "2.541.1", "PLUGIN_CLI_VERSION": "2.13.2", "WAR_SHA": "fcf13a8ebbe69d678608cc4b3885ece7d7e697d6da4c3691025a06968ddef228", "WAR_URL": "https://get.jenkins.io/war-stable/2.541.1/jenkins.war" }, "tags": [ "docker.io/jenkins/jenkins:2.541.1-jdk21", "docker.io/jenkins/jenkins:2.541.1" ], "platforms": [ "linux/amd64", "linux/arm64", "linux/s390x", "linux/ppc64le" ], "output": [ { "type": "docker" } ] }, "debian_jdk25": { "context": ".", "dockerfile": "debian/Dockerfile", "args": { "COMMIT_SHA": "c23ccd0d689b05f8110b0d857da9fd64046b8fb4", "DEBIAN_RELEASE_LINE": "trixie", "DEBIAN_VARIANT": "", "DEBIAN_VERSION": "20251117", "JAVA_VERSION": "25.0.1_8", "JENKINS_VERSION": "2.541.1", "PLUGIN_CLI_VERSION": "2.13.2", "WAR_SHA": "fcf13a8ebbe69d678608cc4b3885ece7d7e697d6da4c3691025a06968ddef228", "WAR_URL": "https://get.jenkins.io/war-stable/2.541.1/jenkins.war" }, "tags": [ "docker.io/jenkins/jenkins:2.541.1-jdk25" ], "platforms": [ "linux/amd64", "linux/arm64", "linux/s390x", "linux/ppc64le" ], "output": [ { "type": "docker" } ] }, "rhel_jdk17": { "context": ".", "dockerfile": "rhel/Dockerfile", "args": { "COMMIT_SHA": "c23ccd0d689b05f8110b0d857da9fd64046b8fb4", "JAVA_VERSION": "17.0.17_10", "JENKINS_VERSION": "2.541.1", "PLUGIN_CLI_VERSION": "2.13.2", "RHEL_RELEASE_LINE": "ubi9", "RHEL_TAG": "9.7-1767674301", "WAR_SHA": "fcf13a8ebbe69d678608cc4b3885ece7d7e697d6da4c3691025a06968ddef228", "WAR_URL": "https://get.jenkins.io/war-stable/2.541.1/jenkins.war" }, "tags": [ "docker.io/jenkins/jenkins:2.541.1-rhel-ubi9-jdk17" ], "platforms": [ "linux/amd64", "linux/arm64", "linux/ppc64le" ], "output": [ { "type": "docker" } ] }, "rhel_jdk21": { "context": ".", "dockerfile": "rhel/Dockerfile", "args": { "COMMIT_SHA": "c23ccd0d689b05f8110b0d857da9fd64046b8fb4", "JAVA_VERSION": "21.0.9_10", "JENKINS_VERSION": "2.541.1", "PLUGIN_CLI_VERSION": "2.13.2", "RHEL_RELEASE_LINE": "ubi9", "RHEL_TAG": "9.7-1767674301", "WAR_SHA": "fcf13a8ebbe69d678608cc4b3885ece7d7e697d6da4c3691025a06968ddef228", "WAR_URL": "https://get.jenkins.io/war-stable/2.541.1/jenkins.war" }, "tags": [ "docker.io/jenkins/jenkins:2.541.1-rhel-ubi9-jdk21" ], "platforms": [ "linux/amd64", "linux/arm64", "linux/ppc64le" ], "output": [ { "type": "docker" } ] }, "rhel_jdk25": { "context": ".", "dockerfile": "rhel/Dockerfile", "args": { "COMMIT_SHA": "c23ccd0d689b05f8110b0d857da9fd64046b8fb4", "JAVA_VERSION": "25.0.1_8", "JENKINS_VERSION": "2.541.1", "PLUGIN_CLI_VERSION": "2.13.2", "RHEL_RELEASE_LINE": "ubi9", "RHEL_TAG": "9.7-1767674301", "WAR_SHA": "fcf13a8ebbe69d678608cc4b3885ece7d7e697d6da4c3691025a06968ddef228", "WAR_URL": "https://get.jenkins.io/war-stable/2.541.1/jenkins.war" }, "tags": [ "docker.io/jenkins/jenkins:2.541.1-rhel-ubi9-jdk25" ], "platforms": [ "linux/amd64", "linux/arm64", "linux/ppc64le" ], "output": [ { "type": "docker" } ] } } }Submitter checklist