From 65bf5f7c81fb35f3291a548e9d326a65e331e5eb Mon Sep 17 00:00:00 2001 From: Brian Clozel Date: Mon, 25 Oct 2021 09:58:04 +0200 Subject: [PATCH] Add JDK18 variant to CI pipeline This commit adds a new JDK 18 variant to the CI build image and configures a JDK18 build (sources compiled with JDK17, tests compiled and run with JDK18) to the CI pipeline. Closes gh-27607 --- ci/images/ci-image/Dockerfile | 3 ++- ci/images/get-jdk-url.sh | 13 ++++++---- ci/pipeline.yml | 45 ++++++++++++++++++++++++++++++++++- 3 files changed, 54 insertions(+), 7 deletions(-) diff --git a/ci/images/ci-image/Dockerfile b/ci/images/ci-image/Dockerfile index 548a7cd7c23..6ddd3a38eb3 100644 --- a/ci/images/ci-image/Dockerfile +++ b/ci/images/ci-image/Dockerfile @@ -1,4 +1,4 @@ -FROM ubuntu:focal-20210827 +FROM ubuntu:focal-20211006 ADD setup.sh /setup.sh ADD get-jdk-url.sh /get-jdk-url.sh @@ -6,5 +6,6 @@ RUN ./setup.sh ENV JAVA_HOME /opt/openjdk/java17 ENV JDK17 /opt/openjdk/java17 +ENV JDK18 /opt/openjdk/java18 ENV PATH $JAVA_HOME/bin:$PATH diff --git a/ci/images/get-jdk-url.sh b/ci/images/get-jdk-url.sh index a3babd3ae7d..783b8bb3c75 100755 --- a/ci/images/get-jdk-url.sh +++ b/ci/images/get-jdk-url.sh @@ -2,10 +2,13 @@ set -e case "$1" in - java17) - echo "https://github.com/adoptium/temurin17-binaries/releases/download/jdk-17%2B35/OpenJDK17-jdk_x64_linux_hotspot_17_35.tar.gz" - ;; + java17) + echo "https://github.com/adoptium/temurin17-binaries/releases/download/jdk-17%2B35/OpenJDK17-jdk_x64_linux_hotspot_17_35.tar.gz" + ;; + java18) + echo "https://github.com/adoptium/temurin18-binaries/releases/download/jdk-2021-10-22-05-05-beta/OpenJDK-jdk_x64_linux_hotspot_2021-10-21-23-30.tar.gz" + ;; *) - echo $"Unknown java version" - exit 1 + echo $"Unknown java version" + exit 1 esac diff --git a/ci/pipeline.yml b/ci/pipeline.yml index 53f168b105e..8596734ed61 100644 --- a/ci/pipeline.yml +++ b/ci/pipeline.yml @@ -85,6 +85,13 @@ resources: source: <<: *docker-resource-source repository: ((docker-hub-organization))/spring-framework-ci-jdk17 +- name: every-morning + type: time + icon: alarm + source: + start: 8:00 AM + stop: 9:00 AM + location: Europe/Vienna - name: artifactory-repo type: artifactory-resource icon: package-variant @@ -109,6 +116,14 @@ resources: access_token: ((github-ci-status-token)) branch: ((branch)) context: build +- name: repo-status-jdk18-build + type: github-status-resource + icon: eye-check-outline + source: + repository: ((github-repo-name)) + access_token: ((github-ci-status-token)) + branch: ((branch)) + context: jdk18-build - name: slack-alert type: slack-notification icon: slack @@ -198,6 +213,34 @@ jobs: "zip.type": "schema" get_params: threads: 8 +- name: jdk18-build + serial: true + public: true + plan: + - get: ci-image + - get: git-repo + - get: every-morning + trigger: true + - put: repo-status-jdk18-build + params: { state: "pending", commit: "git-repo" } + - do: + - task: check-project + image: ci-image + file: git-repo/ci/tasks/check-project.yml + privileged: true + timeout: ((task-timeout)) + params: + TEST_TOOLCHAIN: 18 + <<: *build-project-task-params + on_failure: + do: + - put: repo-status-jdk18-build + params: { state: "failure", commit: "git-repo" } + - put: slack-alert + params: + <<: *slack-fail-params + - put: repo-status-jdk18-build + params: { state: "success", commit: "git-repo" } - name: build-pull-requests serial: true public: true @@ -379,7 +422,7 @@ jobs: groups: - name: "builds" - jobs: ["build"] + jobs: ["build", "jdk18-build"] - name: "releases" jobs: ["stage-milestone", "stage-rc", "stage-release", "promote-milestone", "promote-rc", "promote-release", "create-github-release"] - name: "ci-images"