Configure JDK 21 CI build

This commit replaces the JDK 20 compatibility build with a JDK 21 (early
access) variant.

See gh-30339
This commit is contained in:
Brian Clozel 2023-04-12 15:15:29 +02:00
parent 5c574b9878
commit 63e20404a2
4 changed files with 13 additions and 10 deletions

View File

@ -6,6 +6,6 @@ RUN ./setup.sh
ENV JAVA_HOME /opt/openjdk/java17 ENV JAVA_HOME /opt/openjdk/java17
ENV JDK17 /opt/openjdk/java17 ENV JDK17 /opt/openjdk/java17
ENV JDK20 /opt/openjdk/java20 ENV JDK21 /opt/openjdk/java20
ENV PATH $JAVA_HOME/bin:$PATH ENV PATH $JAVA_HOME/bin:$PATH

View File

@ -8,6 +8,9 @@ case "$1" in
java20) java20)
echo "https://github.com/bell-sw/Liberica/releases/download/20%2B37/bellsoft-jdk20+37-linux-amd64.tar.gz" echo "https://github.com/bell-sw/Liberica/releases/download/20%2B37/bellsoft-jdk20+37-linux-amd64.tar.gz"
;; ;;
java21)
echo "https://download.java.net/java/early_access/jdk21/18/GPL/openjdk-21-ea+18_linux-x64_bin.tar.gz"
;;
*) *)
echo $"Unknown java version" echo $"Unknown java version"
exit 1 exit 1

View File

@ -127,14 +127,14 @@ resources:
access_token: ((github-ci-status-token)) access_token: ((github-ci-status-token))
branch: ((branch)) branch: ((branch))
context: build context: build
- name: repo-status-jdk20-build - name: repo-status-jdk21-build
type: github-status-resource type: github-status-resource
icon: eye-check-outline icon: eye-check-outline
source: source:
repository: ((github-repo-name)) repository: ((github-repo-name))
access_token: ((github-ci-status-token)) access_token: ((github-ci-status-token))
branch: ((branch)) branch: ((branch))
context: jdk20-build context: jdk21-build
- name: slack-alert - name: slack-alert
type: slack-notification type: slack-notification
icon: slack icon: slack
@ -231,7 +231,7 @@ jobs:
"zip.type": "schema" "zip.type": "schema"
get_params: get_params:
threads: 8 threads: 8
- name: jdk20-build - name: jdk21-build
serial: true serial: true
public: true public: true
plan: plan:
@ -239,7 +239,7 @@ jobs:
- get: git-repo - get: git-repo
- get: every-morning - get: every-morning
trigger: true trigger: true
- put: repo-status-jdk20-build - put: repo-status-jdk21-build
params: { state: "pending", commit: "git-repo" } params: { state: "pending", commit: "git-repo" }
- do: - do:
- task: check-project - task: check-project
@ -248,16 +248,16 @@ jobs:
privileged: true privileged: true
timeout: ((task-timeout)) timeout: ((task-timeout))
params: params:
TEST_TOOLCHAIN: 20 TEST_TOOLCHAIN: 21
<<: *build-project-task-params <<: *build-project-task-params
on_failure: on_failure:
do: do:
- put: repo-status-jdk20-build - put: repo-status-jdk21-build
params: { state: "failure", commit: "git-repo" } params: { state: "failure", commit: "git-repo" }
- put: slack-alert - put: slack-alert
params: params:
<<: *slack-fail-params <<: *slack-fail-params
- put: repo-status-jdk20-build - put: repo-status-jdk21-build
params: { state: "success", commit: "git-repo" } params: { state: "success", commit: "git-repo" }
- name: build-pull-requests - name: build-pull-requests
serial: true serial: true
@ -441,7 +441,7 @@ jobs:
groups: groups:
- name: "builds" - name: "builds"
jobs: ["build", "jdk20-build"] jobs: ["build", "jdk21-build"]
- name: "releases" - name: "releases"
jobs: ["stage-milestone", "stage-rc", "stage-release", "promote-milestone", "promote-rc", "promote-release", "create-github-release"] jobs: ["stage-milestone", "stage-rc", "stage-release", "promote-milestone", "promote-rc", "promote-release", "create-github-release"]
- name: "ci-images" - name: "ci-images"

View File

@ -4,6 +4,6 @@ set -e
source $(dirname $0)/common.sh source $(dirname $0)/common.sh
pushd git-repo > /dev/null pushd git-repo > /dev/null
./gradlew -Dorg.gradle.internal.launcher.welcomeMessageEnabled=false -Porg.gradle.java.installations.fromEnv=JDK17,JDK20 \ ./gradlew -Dorg.gradle.internal.launcher.welcomeMessageEnabled=false -Porg.gradle.java.installations.fromEnv=JDK17,JDK21 \
-PmainToolchain=${MAIN_TOOLCHAIN} -PtestToolchain=${TEST_TOOLCHAIN} --no-daemon --max-workers=4 check -PmainToolchain=${MAIN_TOOLCHAIN} -PtestToolchain=${TEST_TOOLCHAIN} --no-daemon --max-workers=4 check
popd > /dev/null popd > /dev/null