Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove Java 11 support #890

Merged
merged 3 commits into from
Oct 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 0 additions & 12 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,6 @@
version: 2
updates:

# Arch Linux
- package-ecosystem: docker
directory: "archlinux"
schedule:
interval: weekly
open-pull-requests-limit: 2
target-branch: master
reviewers:
- MarkEWaite
labels:
- dependencies

# GitHub actions
- package-ecosystem: "github-actions"
target-branch: master
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ bake_base_cli := docker buildx bake --file docker-bake.hcl
bake_cli := $(bake_base_cli) --load

.PHONY: build
.PHONY: test test-alpine test-archlinux test-debian test-jdk11 test-jdk11-alpine
.PHONY: test test-alpine test-debian

check-reqs:
## Build requirements
Expand Down
30 changes: 12 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,19 +30,14 @@ If you want to see the target images (matching your current architecture) that w

```bash
$ make list
agent_alpine_jdk11
agent_alpine_jdk17
agent_alpine_jdk21
agent_archlinux_jdk11
agent_debian_jdk11
agent_debian_jdk17
agent_debian_jdk21
agent_rhel_ubi9_jdk17
agent_rhel_ubi9_jdk21
inbound-agent_alpine_jdk11
inbound-agent_alpine_jdk17
inbound-agent_alpine_jdk21
inbound-agent_debian_jdk11
inbound-agent_debian_jdk17
inbound-agent_debian_jdk21
inbound-agent_rhel_ubi9_jdk17
Expand Down Expand Up @@ -110,20 +105,16 @@ $ make show
"group": {
"alpine": {
"targets": [
"agent_alpine_jdk11",
"agent_alpine_jdk17",
"agent_alpine_jdk21",
"inbound-agent_alpine_jdk11",
"inbound-agent_alpine_jdk17",
"inbound-agent_alpine_jdk21"
]
},
"debian": {
"targets": [
"agent_debian_jdk11",
"agent_debian_jdk17",
"agent_debian_jdk21",
"inbound-agent_debian_jdk11",
"inbound-agent_debian_jdk17",
"inbound-agent_debian_jdk21"
]
Expand All @@ -135,7 +126,6 @@ $ make show
},
"linux": {
"targets": [
"agent_archlinux_jdk11",
"alpine",
"debian",
"rhel_ubi9"
Expand All @@ -151,19 +141,23 @@ $ make show
}
},
"target": {
"agent_alpine_jdk11": {
"agent_alpine_jdk17": {
"context": ".",
"dockerfile": "alpine/Dockerfile",
"args": {
"ALPINE_TAG": "3.20.1",
"JAVA_VERSION": "11.0.23_9",
"VERSION": "3256.v88a_f6e922152"
"ALPINE_TAG": "3.20.3",
"JAVA_VERSION": "17.0.12_7",
"VERSION": "3261.v9c670a_4748a_9"
},
"tags": [
"docker.io/jenkins/agent:alpine-jdk11",
"docker.io/jenkins/agent:alpine3.20-jdk11",
"docker.io/jenkins/agent:latest-alpine-jdk11",
"docker.io/jenkins/agent:latest-alpine3.20-jdk11"
"docker.io/jenkins/agent:alpine",
"docker.io/jenkins/agent:alpine3.20",
"docker.io/jenkins/agent:latest-alpine",
"docker.io/jenkins/agent:latest-alpine3.20",
"docker.io/jenkins/agent:alpine-jdk17",
"docker.io/jenkins/agent:alpine3.20-jdk17",
"docker.io/jenkins/agent:latest-alpine-jdk17",
"docker.io/jenkins/agent:latest-alpine3.20-jdk17"
],
"target": "agent",
"platforms": [
Expand Down
31 changes: 1 addition & 30 deletions README_agent.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ docker run -i --rm --name agent1 --init -v agent1-workdir:/home/jenkins/agent je
Call example for Windows Containers:

```powershell
docker run -i --rm --name agent1 --init -v agent1-workdir:C:/Users/jenkins/Work jenkins/agent:jdk11-windowsservercore-ltsc2019 java -jar C:/ProgramData/Jenkins/agent.jar -workDir C:/Users/jenkins/Work
docker run -i --rm --name agent1 --init -v agent1-workdir:C:/Users/jenkins/Work jenkins/agent:jdk17-windowsservercore-ltsc2019 java -jar C:/ProgramData/Jenkins/agent.jar -workDir C:/Users/jenkins/Work
```

## Configurations
Expand Down Expand Up @@ -83,33 +83,13 @@ The image has several supported configurations, which can be accessed via the fo
* rhel-ubi9 (Based on Red Hat Universal Base Image 9)
* `jenkins/agent:rhel-ubi9-jdk21`
* `jenkins/agent:latest-rhel-ubi9-jdk21`
* Java 11:
* bookworm (Based on `debian:bookworm-${builddate}`):
* `jenkins/agent:bookworm`
* `jenkins/agent:bookworm-jdk11`
* `jenkins/agent:jdk11`
* `jenkins/agent:latest-bookworm-jdk11`
* alpine (Small image based on Alpine Linux, based on `alpine:${version}`):
* `jenkins/agent:alpine`
* `jenkins/agent:alpine-jdk11`
* `jenkins/agent:latest-alpine`
* `jenkins/agent:latest-alpine-jdk11`
* archlinux (Image based on Arch Linux, based on `archlinux:latest`):
* `jenkins/agent:archlinux`
* `jenkins/agent:archlinux-jdk11`
* `jenkins/agent:latest-archlinux`
* `jenkins/agent:latest-archlinux-jdk11`

* Windows Images:
* Java 17 (default):
* Latest Jenkins agent version on Windows Nano Server and Java 17:
* `jenkins/agent:jdk17-nanoserver-1809`
* `jenkins/agent:jdk17-nanoserver-ltsc2019`
* `jenkins/agent:jdk17-nanoserver-ltsc2022`
* Latest Jenkins agent version on Windows Server Core with Java 11:
* `jenkins/agent:jdk17-windowsservercore-1809`
* `jenkins/agent:jdk17-windowsservercore-ltsc2019`
* `jenkins/agent:jdk17-windowsservercore-ltsc2022`
* Java 21:
* Latest Jenkins agent version on Windows Nano Server and Java 21:
* `jenkins/agent:jdk21-nanoserver-1809`
Expand All @@ -119,15 +99,6 @@ The image has several supported configurations, which can be accessed via the fo
* `jenkins/agent:jdk21-windowsservercore-1809`
* `jenkins/agent:jdk21-windowsservercore-ltsc2019`
* `jenkins/agent:jdk21-windowsservercore-ltsc2022`
* Java 11:
* Latest Jenkins agent version on Windows Nano Server and Java 11:
* `jenkins/agent:jdk11-nanoserver-1809`
* `jenkins/agent:jdk11-nanoserver-ltsc2019`
* `jenkins/agent:jdk11-nanoserver-ltsc2022`
* Latest Jenkins agent version on Windows Server Core with Java 11:
* `jenkins/agent:jdk11-windowsservercore-1809`
* `jenkins/agent:jdk11-windowsservercore-ltsc2019`
* `jenkins/agent:jdk11-windowsservercore-ltsc2022`

The file [docker-bake.hcl](https://github.com/jenkinsci/docker-agent/blob/master/docker-bake.hcl) defines all the configuration for Linux images and their associated tags.

Expand Down
8 changes: 3 additions & 5 deletions alpine/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -42,16 +42,14 @@ RUN apk add --no-cache \
ENV PATH="/opt/jdk-${JAVA_VERSION}/bin:${PATH}"

RUN case "$(jlink --version 2>&1)" in \
# jlink version 11 has less features than JDK17+
"11."*) set -- "--strip-debug" "--compress=2" ;; \
"17."*) set -- "--strip-java-debug-attributes" "--compress=2" ;; \
"17."*) set -- "--compress=2" ;; \
# the compression argument is different for JDK21
"21."*) set -- "--strip-java-debug-attributes" "--compress=zip-6" ;; \
"21."*) set -- "--compress=zip-6" ;; \
*) echo "ERROR: unmanaged jlink version pattern" && exit 1 ;; \
esac; \
jlink \
--strip-java-debug-attributes \
"$1" \
"$2" \
--add-modules ALL-MODULE-PATH \
--no-man-pages \
--no-header-files \
Expand Down
94 changes: 0 additions & 94 deletions archlinux/Dockerfile

This file was deleted.

8 changes: 3 additions & 5 deletions debian/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -47,16 +47,14 @@ ENV PATH="/opt/jdk-${JAVA_VERSION}/bin:${PATH}"
# while still saving space (approx 200mb from the full distribution)
RUN if [[ "${TARGETPLATFORM}" != "linux/arm/v7" ]]; then \
case "$(jlink --version 2>&1)" in \
# jlink version 11 has less features than JDK17+
"11."*) set -- "--strip-debug" "--compress=2" ;; \
"17."*) set -- "--strip-java-debug-attributes" "--compress=2" ;; \
"17."*) set -- "--compress=2" ;; \
# the compression argument is different for JDK21
"21."*) set -- "--strip-java-debug-attributes" "--compress=zip-6" ;; \
"21."*) set -- "--compress=zip-6" ;; \
*) echo "ERROR: unmanaged jlink version pattern" && exit 1 ;; \
esac; \
jlink \
--strip-java-debug-attributes \
"$1" \
"$2" \
--add-modules ALL-MODULE-PATH \
--no-man-pages \
--no-header-files \
Expand Down
Loading