jenkinsci / docker-ssh-agent

Docker image for Jenkins agents connected over SSH
https://hub.docker.com/repository/docker/jenkins/ssh-agent
MIT License
179 stars 175 forks source link

breaking(Linux): short tags targeting Java 17 instead of Java 11 #400

Closed lemeurherve closed 4 months ago

lemeurherve commented 4 months ago

This PR changes the short tags to target Java 17 (current default JDK version for Jenkins) instead of Java 11.

The Windows images short tags are already JDK17 ones.

Concerned short tags (3 Alpine and 2 Debian):

Closes:

Testing done

Compared the output of docker buildx bake --file docker-bake.hcl linux --print with VERSION=1.2.3 & ON_TAG=true:

Before ``` { "group": { "default": { "targets": [ "linux" ] }, "linux": { "targets": [ "alpine_jdk11", "alpine_jdk17", "alpine_jdk21", "debian_jdk11", "debian_jdk17", "debian_jdk21", "debian_jdk21-preview" ] } }, "target": { "alpine_jdk11": { "context": ".", "dockerfile": "alpine/Dockerfile", "args": { "ALPINE_TAG": "3.19.1", "JAVA_VERSION": "11.0.23_9" }, "tags": [ "docker.io/jenkins/ssh-agent:1.2.3-alpine-jdk11", "docker.io/jenkins/ssh-agent:1.2.3-alpine3.19-jdk11", "docker.io/jenkins/ssh-agent:alpine", "docker.io/jenkins/ssh-agent:alpine-jdk11", "docker.io/jenkins/ssh-agent:latest-alpine-jdk11", "docker.io/jenkins/ssh-agent:alpine3.19", "docker.io/jenkins/ssh-agent:alpine3.19-jdk11", "docker.io/jenkins/ssh-agent:latest-alpine3.19-jdk11", "docker.io/jenkins/ssh-agent:latest-alpine3.19" ], "platforms": [ "linux/amd64" ] }, "alpine_jdk17": { "context": ".", "dockerfile": "alpine/Dockerfile", "args": { "ALPINE_TAG": "3.19.1", "JAVA_VERSION": "17.0.11_9" }, "tags": [ "docker.io/jenkins/ssh-agent:1.2.3-alpine-jdk17", "docker.io/jenkins/ssh-agent:1.2.3-alpine3.19-jdk17", "docker.io/jenkins/ssh-agent:alpine-jdk17", "docker.io/jenkins/ssh-agent:latest-alpine-jdk17", "docker.io/jenkins/ssh-agent:alpine3.19-jdk17", "docker.io/jenkins/ssh-agent:latest-alpine3.19-jdk17" ], "platforms": [ "linux/amd64" ] }, "alpine_jdk21": { "context": ".", "dockerfile": "alpine/Dockerfile", "args": { "ALPINE_TAG": "3.19.1", "JAVA_VERSION": "21.0.3_9" }, "tags": [ "docker.io/jenkins/ssh-agent:1.2.3-alpine-jdk21", "docker.io/jenkins/ssh-agent:1.2.3-alpine3.19-jdk21", "docker.io/jenkins/ssh-agent:alpine-jdk21", "docker.io/jenkins/ssh-agent:latest-alpine-jdk21", "docker.io/jenkins/ssh-agent:alpine3.19-jdk21", "docker.io/jenkins/ssh-agent:latest-alpine3.19-jdk21" ], "platforms": [ "linux/amd64", "linux/arm64" ] }, "debian_jdk11": { "context": ".", "dockerfile": "debian/Dockerfile", "args": { "DEBIAN_RELEASE": "bookworm-20240423", "JAVA_VERSION": "11.0.23_9" }, "tags": [ "docker.io/jenkins/ssh-agent:1.2.3", "docker.io/jenkins/ssh-agent:1.2.3-jdk11", "docker.io/jenkins/ssh-agent:bookworm-jdk11", "docker.io/jenkins/ssh-agent:debian-jdk11", "docker.io/jenkins/ssh-agent:jdk11", "docker.io/jenkins/ssh-agent:latest", "docker.io/jenkins/ssh-agent:latest-bookworm-jdk11", "docker.io/jenkins/ssh-agent:latest-debian-jdk11", "docker.io/jenkins/ssh-agent:latest-jdk11" ], "platforms": [ "linux/amd64", "linux/arm64", "linux/s390x", "linux/ppc64le" ] }, "debian_jdk17": { "context": ".", "dockerfile": "debian/Dockerfile", "args": { "DEBIAN_RELEASE": "bookworm-20240423", "JAVA_VERSION": "17.0.11_9" }, "tags": [ "docker.io/jenkins/ssh-agent:1.2.3-jdk17", "docker.io/jenkins/ssh-agent:bookworm-jdk17", "docker.io/jenkins/ssh-agent:debian-jdk17", "docker.io/jenkins/ssh-agent:jdk17", "docker.io/jenkins/ssh-agent:latest-bookworm-jdk17", "docker.io/jenkins/ssh-agent:latest-debian-jdk17", "docker.io/jenkins/ssh-agent:latest-jdk17" ], "platforms": [ "linux/amd64", "linux/arm64", "linux/ppc64le" ] }, "debian_jdk21": { "context": ".", "dockerfile": "debian/Dockerfile", "args": { "DEBIAN_RELEASE": "bookworm-20240423", "JAVA_VERSION": "21.0.3_9" }, "tags": [ "docker.io/jenkins/ssh-agent:1.2.3-jdk21", "docker.io/jenkins/ssh-agent:bookworm-jdk21", "docker.io/jenkins/ssh-agent:debian-jdk21", "docker.io/jenkins/ssh-agent:jdk21", "docker.io/jenkins/ssh-agent:latest-bookworm-jdk21", "docker.io/jenkins/ssh-agent:latest-debian-jdk21", "docker.io/jenkins/ssh-agent:latest-jdk21" ], "platforms": [ "linux/amd64", "linux/arm64", "linux/ppc64le", "linux/s390x" ] }, "debian_jdk21-preview": { "context": ".", "dockerfile": "debian/preview/Dockerfile", "args": { "DEBIAN_RELEASE": "bookworm-20240423", "JAVA_VERSION": "21.0.1+12" }, "tags": [ "docker.io/jenkins/ssh-agent:1.2.3-jdk21-preview", "docker.io/jenkins/ssh-agent:bookworm-jdk21-preview", "docker.io/jenkins/ssh-agent:debian-jdk21-preview", "docker.io/jenkins/ssh-agent:jdk21-preview", "docker.io/jenkins/ssh-agent:latest-bookworm-jdk21-preview", "docker.io/jenkins/ssh-agent:latest-debian-jdk21-preview", "docker.io/jenkins/ssh-agent:latest-jdk21-preview" ], "platforms": [ "linux/arm/v7" ] } } } ```
After ``` { "group": { "default": { "targets": [ "linux" ] }, "linux": { "targets": [ "alpine_jdk11", "alpine_jdk17", "alpine_jdk21", "debian_jdk11", "debian_jdk17", "debian_jdk21", "debian_jdk21-preview" ] } }, "target": { "alpine_jdk11": { "context": ".", "dockerfile": "alpine/Dockerfile", "args": { "ALPINE_TAG": "3.19.1", "JAVA_VERSION": "11.0.23_9" }, "tags": [ "docker.io/jenkins/ssh-agent:1.2.3-alpine-jdk11", "docker.io/jenkins/ssh-agent:1.2.3-alpine3.19-jdk11", "docker.io/jenkins/ssh-agent:alpine-jdk11", "docker.io/jenkins/ssh-agent:latest-alpine-jdk11", "docker.io/jenkins/ssh-agent:alpine3.19-jdk11", "docker.io/jenkins/ssh-agent:latest-alpine3.19-jdk11" ], "platforms": [ "linux/amd64" ] }, "alpine_jdk17": { "context": ".", "dockerfile": "alpine/Dockerfile", "args": { "ALPINE_TAG": "3.19.1", "JAVA_VERSION": "17.0.11_9" }, "tags": [ "docker.io/jenkins/ssh-agent:1.2.3-alpine-jdk17", "docker.io/jenkins/ssh-agent:1.2.3-alpine3.19-jdk17", "docker.io/jenkins/ssh-agent:alpine", "docker.io/jenkins/ssh-agent:alpine-jdk17", "docker.io/jenkins/ssh-agent:latest-alpine-jdk17", "docker.io/jenkins/ssh-agent:alpine3.19", "docker.io/jenkins/ssh-agent:alpine3.19-jdk17", "docker.io/jenkins/ssh-agent:latest-alpine3.19", "docker.io/jenkins/ssh-agent:latest-alpine3.19-jdk17" ], "platforms": [ "linux/amd64" ] }, "alpine_jdk21": { "context": ".", "dockerfile": "alpine/Dockerfile", "args": { "ALPINE_TAG": "3.19.1", "JAVA_VERSION": "21.0.3_9" }, "tags": [ "docker.io/jenkins/ssh-agent:1.2.3-alpine-jdk21", "docker.io/jenkins/ssh-agent:1.2.3-alpine3.19-jdk21", "docker.io/jenkins/ssh-agent:alpine-jdk21", "docker.io/jenkins/ssh-agent:latest-alpine-jdk21", "docker.io/jenkins/ssh-agent:alpine3.19-jdk21", "docker.io/jenkins/ssh-agent:latest-alpine3.19-jdk21" ], "platforms": [ "linux/amd64", "linux/arm64" ] }, "debian_jdk11": { "context": ".", "dockerfile": "debian/Dockerfile", "args": { "DEBIAN_RELEASE": "bookworm-20240423", "JAVA_VERSION": "11.0.23_9" }, "tags": [ "docker.io/jenkins/ssh-agent:1.2.3-jdk11", "docker.io/jenkins/ssh-agent:bookworm-jdk11", "docker.io/jenkins/ssh-agent:debian-jdk11", "docker.io/jenkins/ssh-agent:jdk11", "docker.io/jenkins/ssh-agent:latest-bookworm-jdk11", "docker.io/jenkins/ssh-agent:latest-debian-jdk11", "docker.io/jenkins/ssh-agent:latest-jdk11" ], "platforms": [ "linux/amd64", "linux/arm64", "linux/s390x", "linux/ppc64le" ] }, "debian_jdk17": { "context": ".", "dockerfile": "debian/Dockerfile", "args": { "DEBIAN_RELEASE": "bookworm-20240423", "JAVA_VERSION": "17.0.11_9" }, "tags": [ "docker.io/jenkins/ssh-agent:1.2.3", "docker.io/jenkins/ssh-agent:1.2.3-jdk17", "docker.io/jenkins/ssh-agent:bookworm-jdk17", "docker.io/jenkins/ssh-agent:debian-jdk17", "docker.io/jenkins/ssh-agent:jdk17", "docker.io/jenkins/ssh-agent:latest", "docker.io/jenkins/ssh-agent:latest-bookworm-jdk17", "docker.io/jenkins/ssh-agent:latest-debian-jdk17", "docker.io/jenkins/ssh-agent:latest-jdk17" ], "platforms": [ "linux/amd64", "linux/arm64", "linux/ppc64le" ] }, "debian_jdk21": { "context": ".", "dockerfile": "debian/Dockerfile", "args": { "DEBIAN_RELEASE": "bookworm-20240423", "JAVA_VERSION": "21.0.3_9" }, "tags": [ "docker.io/jenkins/ssh-agent:1.2.3-jdk21", "docker.io/jenkins/ssh-agent:bookworm-jdk21", "docker.io/jenkins/ssh-agent:debian-jdk21", "docker.io/jenkins/ssh-agent:jdk21", "docker.io/jenkins/ssh-agent:latest-bookworm-jdk21", "docker.io/jenkins/ssh-agent:latest-debian-jdk21", "docker.io/jenkins/ssh-agent:latest-jdk21" ], "platforms": [ "linux/amd64", "linux/arm64", "linux/ppc64le", "linux/s390x" ] }, "debian_jdk21-preview": { "context": ".", "dockerfile": "debian/preview/Dockerfile", "args": { "DEBIAN_RELEASE": "bookworm-20240423", "JAVA_VERSION": "21.0.1+12" }, "tags": [ "docker.io/jenkins/ssh-agent:1.2.3-jdk21-preview", "docker.io/jenkins/ssh-agent:bookworm-jdk21-preview", "docker.io/jenkins/ssh-agent:debian-jdk21-preview", "docker.io/jenkins/ssh-agent:jdk21-preview", "docker.io/jenkins/ssh-agent:latest-bookworm-jdk21-preview", "docker.io/jenkins/ssh-agent:latest-debian-jdk21-preview", "docker.io/jenkins/ssh-agent:latest-jdk21-preview" ], "platforms": [ "linux/arm/v7" ] } } } ```
### Submitter checklist
- [x] Make sure you are opening from a **topic/feature/bugfix branch** (right side) and not your main branch!
- [x] Ensure that the pull request title represents the desired changelog entry
- [x] Please describe what you did
- [x] Link to relevant issues in GitHub or Jira
- [x] Link to relevant pull requests, esp. upstream and downstream changes
- [x] Ensure you have provided tests - that demonstrates feature works or fixes the issue
lemeurherve commented 4 months ago

Note that #401 results in the same change in fine.

lemeurherve commented 4 months ago

Putting in draft until #401 is merged:

Setting the default JDK to 11 so we can introduce this pull request without any (breaking) change.

Solving #399 will then be as simple as setting this default_jdk value to 17.

_Originally posted by @lemeurherve in https://github.com/jenkinsci/docker-ssh-agent/pull/401#discussion_r1596938292_