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

feat(Linux): switch supported architectures to GA Temurin jdk21 images #521

Merged
merged 27 commits into from
Oct 22, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
a229a44
feat(Linux): add Java 21
lemeurherve Oct 11, 2023
dac97be
fix jdk21 version in docker-bake and updatecli script
lemeurherve Oct 12, 2023
c8a27eb
remove linux-arm32 and linux-ppc64le architectures for jdk21, unavail…
lemeurherve Oct 12, 2023
8fa815e
also remove linux-s390x for jdk21
lemeurherve Oct 12, 2023
5c62d0d
keep jdk21-preview for architectures unsupported by eclipse-temurin:2…
lemeurherve Oct 12, 2023
2777001
update jdk21 updatecli manifest
lemeurherve Oct 12, 2023
4a41fcc
Revert "keep jdk21-preview for architectures unsupported by eclipse-t…
lemeurherve Oct 12, 2023
7b24f4e
remove s390x target architecture for jdk21 as temurin won't support it
lemeurherve Oct 12, 2023
2c5fd09
Update check-jdk.sh
lemeurherve Oct 13, 2023
17b8e4d
Update check-jdk.sh
lemeurherve Oct 13, 2023
9a23800
Update check-jdk.sh
lemeurherve Oct 13, 2023
81935bd
try out the two available architectures for now
lemeurherve Oct 17, 2023
cb315b3
restore updatecli folder for now
lemeurherve Oct 17, 2023
378d786
Revert "try out the two available architectures for now"
lemeurherve Oct 17, 2023
fbe1d15
Revert "Revert "keep jdk21-preview for architectures unsupported by e…
lemeurherve Oct 20, 2023
d5e7adc
rename '21' folder to 'preview'
lemeurherve Oct 22, 2023
5436b82
restore change
lemeurherve Oct 22, 2023
20e4ec8
remove alpine preview version, not needed as its two architectures ar…
lemeurherve Oct 22, 2023
db8aada
add distinct JAVA21_PREVIEW_VERSION
lemeurherve Oct 22, 2023
ca5a30b
fix jdk21-preview Dockerfile location
lemeurherve Oct 22, 2023
4c50885
add debian_jdk21_preview to the linux targets group
lemeurherve Oct 22, 2023
0a490c2
apply same fix for preview (EA) release download link as in https://g…
lemeurherve Oct 22, 2023
f0bfe76
special case for preview (EA) version '21_35', no 'ea_' prefix in thi…
lemeurherve Oct 22, 2023
c8ff087
add hadolint ignore DL3008 (no pinned versions with apt-get install)
lemeurherve Oct 22, 2023
6d78e4b
fix 21_35 special case
lemeurherve Oct 22, 2023
26d3f88
same player try again
lemeurherve Oct 22, 2023
db2eb9e
cleanup
lemeurherve Oct 22, 2023
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
93 changes: 0 additions & 93 deletions alpine/21/Dockerfile

This file was deleted.

2 changes: 1 addition & 1 deletion debian/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
# THE SOFTWARE.
ARG DEBIAN_RELEASE=bookworm-20230904
ARG JAVA_VERSION=17.0.8.1_1
FROM eclipse-temurin:"${JAVA_VERSION}"-jdk-focal AS jre-build
FROM eclipse-temurin:"${JAVA_VERSION}"-jdk-jammy AS jre-build

# This Build ARG is populated by Docker
# Ref. https://docs.docker.com/engine/reference/builder/#automatic-platform-args-in-the-global-scope
Expand Down
14 changes: 11 additions & 3 deletions debian/21/Dockerfile → debian/preview/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,24 @@ ARG TARGETPLATFORM

SHELL ["/bin/bash", "-o", "pipefail", "-c"]

## Example of preview (EA) jdk21 JAVA_VERSION values:
# 21+35 (special case)
# 21.0.1+12
## Example of preview (EA) release download link:
# https://github.com/adoptium/temurin21-binaries/releases/download/jdk-21%2B35-ea-beta/OpenJDK21U-jdk_x64_linux_hotspot_ea_21-0-35.tar.gz
# https://github.com/adoptium/temurin21-binaries/releases/download/jdk-21.0.1%2B12-ea-beta/OpenJDK21U-jdk_x64_alpine-linux_hotspot_ea_21-0-1-12.tar.gz

# hadolint ignore=DL3008
RUN set -x; apt-get update \
&& apt-get install --no-install-recommends -y \
ca-certificates \
jq \
wget \
&& BUILD_NUMBER=$(echo $JAVA_VERSION | cut -d'+' -f2) \
&& DASHED_JAVA_VERSION=$(echo "${JAVA_VERSION}" | sed -e 's/\./-/g' -e 's/+/-/' -e 's/21-35/21-0-35/') \
&& JAVA_MAJOR_VERSION=$(echo $JAVA_VERSION | cut -d'+' -f1) \
&& JAVA_VERSION_ENCODED=$(echo "$JAVA_VERSION" | jq "@uri" -jRr) \
&& ENCODED_JAVA_VERSION=$(echo "$JAVA_VERSION" | jq "@uri" -jRr) \
&& CONVERTED_ARCH=$(arch | sed -e 's/x86_64/x64/' -e 's/armv7l/arm/') \
&& wget --quiet https://github.com/adoptium/temurin"${JAVA_MAJOR_VERSION}"-binaries/releases/download/jdk-"${JAVA_VERSION_ENCODED}"-ea-beta/OpenJDK"${JAVA_MAJOR_VERSION}"U-jdk_"${CONVERTED_ARCH}"_linux_hotspot_ea_"${JAVA_MAJOR_VERSION}"-0-"${BUILD_NUMBER}".tar.gz -O /tmp/jdk.tar.gz \
&& wget --quiet https://github.com/adoptium/temurin"${JAVA_MAJOR_VERSION}"-binaries/releases/download/jdk-"${ENCODED_JAVA_VERSION}"-ea-beta/OpenJDK"${JAVA_MAJOR_VERSION}"U-jdk_"${CONVERTED_ARCH}"_linux_hotspot_ea_"${DASHED_JAVA_VERSION}".tar.gz -O /tmp/jdk.tar.gz \
&& tar -xzf /tmp/jdk.tar.gz -C /opt/ \
&& rm -f /tmp/jdk.tar.gz

Expand Down
48 changes: 35 additions & 13 deletions docker-bake.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ group "linux" {
"debian_jdk11",
"debian_jdk17",
"debian_jdk21",
"debian_jdk21_preview"
]
}

Expand All @@ -23,22 +24,22 @@ group "linux-arm32" {
targets = [
"debian_jdk11",
"debian_jdk17",
"debian_jdk21"
"debian_jdk21_preview"
]
}

group "linux-s390x" {
targets = [
"debian_jdk11",
"debian_jdk21"
"debian_jdk21_preview"
]
}

group "linux-ppc64le" {
targets = [
"debian_jdk11",
"debian_jdk17",
"debian_jdk21"
"debian_jdk21_preview"
]
}

Expand Down Expand Up @@ -83,6 +84,10 @@ variable "JAVA17_VERSION" {
}

variable "JAVA21_VERSION" {
default = "21_35"
}

variable "JAVA21_PREVIEW_VERSION" {
default = "21+35"
}

Expand Down Expand Up @@ -149,20 +154,20 @@ target "alpine_jdk17" {
}

target "alpine_jdk21" {
dockerfile = "alpine/21/Dockerfile"
dockerfile = "alpine/Dockerfile"
context = "."
args = {
ALPINE_TAG = ALPINE_FULL_TAG
JAVA_VERSION = JAVA21_VERSION
VERSION = REMOTING_VERSION
}
tags = [
equal(ON_TAG, "true") ? "${REGISTRY}/${JENKINS_REPO}:${REMOTING_VERSION}-${BUILD_NUMBER}-alpine-jdk21-preview" : "",
equal(ON_TAG, "true") ? "${REGISTRY}/${JENKINS_REPO}:${REMOTING_VERSION}-${BUILD_NUMBER}-alpine${ALPINE_SHORT_TAG}-jdk21-preview" : "",
"${REGISTRY}/${JENKINS_REPO}:alpine-jdk21-preview",
"${REGISTRY}/${JENKINS_REPO}:alpine${ALPINE_SHORT_TAG}-jdk21-preview",
"${REGISTRY}/${JENKINS_REPO}:latest-alpine-jdk21-preview",
"${REGISTRY}/${JENKINS_REPO}:latest-alpine${ALPINE_SHORT_TAG}-jdk21-preview",
equal(ON_TAG, "true") ? "${REGISTRY}/${JENKINS_REPO}:${REMOTING_VERSION}-${BUILD_NUMBER}-alpine-jdk21" : "",
equal(ON_TAG, "true") ? "${REGISTRY}/${JENKINS_REPO}:${REMOTING_VERSION}-${BUILD_NUMBER}-alpine${ALPINE_SHORT_TAG}-jdk21" : "",
"${REGISTRY}/${JENKINS_REPO}:alpine-jdk21",
"${REGISTRY}/${JENKINS_REPO}:alpine${ALPINE_SHORT_TAG}-jdk21",
"${REGISTRY}/${JENKINS_REPO}:latest-alpine-jdk21",
"${REGISTRY}/${JENKINS_REPO}:latest-alpine${ALPINE_SHORT_TAG}-jdk21",
]
platforms = ["linux/amd64", "linux/arm64"]
}
Expand Down Expand Up @@ -206,21 +211,38 @@ target "debian_jdk17" {
platforms = ["linux/amd64", "linux/arm64", "linux/arm/v7", "linux/ppc64le"]
}


target "debian_jdk21" {
dockerfile = "debian/21/Dockerfile"
dockerfile = "debian/Dockerfile"
context = "."
args = {
JAVA_VERSION = JAVA21_VERSION
VERSION = REMOTING_VERSION
DEBIAN_RELEASE = DEBIAN_RELEASE
}
tags = [
equal(ON_TAG, "true") ? "${REGISTRY}/${JENKINS_REPO}:${REMOTING_VERSION}-${BUILD_NUMBER}-jdk21" : "",
"${REGISTRY}/${JENKINS_REPO}:bookworm-jdk21",
"${REGISTRY}/${JENKINS_REPO}:jdk21",
"${REGISTRY}/${JENKINS_REPO}:latest-bookworm-jdk21",
"${REGISTRY}/${JENKINS_REPO}:latest-jdk21",
]
platforms = ["linux/amd64", "linux/arm64"]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would probably just wait a couple of days they probably won't take long to produce the other platforms?

}

target "debian_jdk21_preview" {
lemeurherve marked this conversation as resolved.
Show resolved Hide resolved
dockerfile = "debian/preview/Dockerfile"
context = "."
args = {
JAVA_VERSION = JAVA21_PREVIEW_VERSION
VERSION = REMOTING_VERSION
DEBIAN_RELEASE = DEBIAN_RELEASE
}
tags = [
equal(ON_TAG, "true") ? "${REGISTRY}/${JENKINS_REPO}:${REMOTING_VERSION}-${BUILD_NUMBER}-jdk21-preview" : "",
"${REGISTRY}/${JENKINS_REPO}:bookworm-jdk21-preview",
"${REGISTRY}/${JENKINS_REPO}:jdk21-preview",
"${REGISTRY}/${JENKINS_REPO}:latest-bookworm-jdk21-preview",
"${REGISTRY}/${JENKINS_REPO}:latest-jdk21-preview",
]
platforms = ["linux/amd64", "linux/arm64", "linux/ppc64le", "linux/s390x", "linux/arm/v7"]
platforms = ["linux/ppc64le", "linux/s390x", "linux/arm/v7"]
}