From 4523f010925f5cb805b2d83445dcf713534a3b11 Mon Sep 17 00:00:00 2001 From: Andy Wilkinson Date: Thu, 8 Sep 2022 15:40:52 +0100 Subject: [PATCH] Set up CI on JDK 19 Closes gh-32258 --- ci/images/ci-image-jdk19/Dockerfile | 12 ++++ ci/images/get-jdk-url.sh | 3 + ci/pipeline.yml | 90 ++++++++++++++++++++++++++++- 3 files changed, 103 insertions(+), 2 deletions(-) create mode 100644 ci/images/ci-image-jdk19/Dockerfile diff --git a/ci/images/ci-image-jdk19/Dockerfile b/ci/images/ci-image-jdk19/Dockerfile new file mode 100644 index 0000000000..937aff67bd --- /dev/null +++ b/ci/images/ci-image-jdk19/Dockerfile @@ -0,0 +1,12 @@ +FROM ubuntu:focal-20220801 + +ADD setup.sh /setup.sh +ADD get-jdk-url.sh /get-jdk-url.sh +ADD get-docker-url.sh /get-docker-url.sh +RUN ./setup.sh java8 java19 + +ENV JAVA_HOME /opt/openjdk +ENV PATH $JAVA_HOME/bin:$PATH +ADD docker-lib.sh /docker-lib.sh + +ENTRYPOINT [ "switch", "shell=/bin/bash", "--", "codep", "/bin/docker daemon" ] diff --git a/ci/images/get-jdk-url.sh b/ci/images/get-jdk-url.sh index 5b2600a571..c186d93228 100755 --- a/ci/images/get-jdk-url.sh +++ b/ci/images/get-jdk-url.sh @@ -14,6 +14,9 @@ case "$1" in java18) echo "https://github.com/bell-sw/Liberica/releases/download/18.0.2.1+1/bellsoft-jdk18.0.2.1+1-linux-amd64.tar.gz" ;; + java19) + echo "https://github.com/adoptium/temurin19-binaries/releases/download/jdk19-2022-09-06-18-04-beta/OpenJDK19U-jdk_x64_linux_hotspot_2022-09-06-18-04.tar.gz" + ;; *) echo $"Unknown java version" exit 1 diff --git a/ci/pipeline.yml b/ci/pipeline.yml index f0db3236fb..706fa9e885 100644 --- a/ci/pipeline.yml +++ b/ci/pipeline.yml @@ -199,6 +199,12 @@ resources: source: <<: *registry-image-resource-source repository: ((docker-hub-organization))/spring-boot-ci-jdk18 +- name: ci-image-jdk19 + type: registry-image + icon: docker + source: + <<: *registry-image-resource-source + repository: ((docker-hub-organization))/spring-boot-ci-jdk19 - name: paketo-builder-base-image type: registry-image icon: docker @@ -245,6 +251,14 @@ resources: access_token: ((github-ci-status-token)) branch: ((branch)) context: jdk18-build +- name: repo-status-jdk19-build + type: github-status-resource + icon: eye-check-outline + source: + repository: ((github-repo-name)) + access_token: ((github-ci-status-token)) + branch: ((branch)) + context: jdk19-build - name: slack-alert type: slack-notification icon: slack @@ -305,6 +319,14 @@ jobs: vars: ci-image-name: ci-image-jdk18 <<: *docker-hub-mirror-vars + - task: build-ci-image-jdk19 + privileged: true + file: git-repo/ci/tasks/build-ci-image.yml + output_mapping: + image: ci-image-jdk19 + vars: + ci-image-name: ci-image-jdk19 + <<: *docker-hub-mirror-vars - in_parallel: - put: ci-image params: @@ -318,6 +340,9 @@ jobs: - put: ci-image-jdk18 params: image: ci-image-jdk18/image.tar + - put: ci-image-jdk19 + params: + image: ci-image-jdk19/image.tar - name: detect-jdk-updates plan: - get: git-repo @@ -525,6 +550,38 @@ jobs: - put: slack-alert params: <<: *slack-success-params +- name: jdk19-build + serial: true + public: true + plan: + - get: ci-image-jdk19 + - get: git-repo + trigger: true + - put: repo-status-jdk19-build + params: { state: "pending", commit: "git-repo" } + - do: + - task: build-project + image: ci-image-jdk19 + privileged: true + timeout: ((task-timeout)) + file: git-repo/ci/tasks/build-project.yml + params: + BRANCH: ((branch)) + TOOLCHAIN_JAVA_VERSION: 19 + <<: *gradle-enterprise-task-params + <<: *docker-hub-task-params + on_failure: + do: + - put: repo-status-jdk19-build + params: { state: "failure", commit: "git-repo" } + - put: slack-alert + params: + <<: *slack-fail-params + - put: repo-status-jdk19-build + params: { state: "success", commit: "git-repo" } + - put: slack-alert + params: + <<: *slack-success-params - name: windows-build serial: true plan: @@ -878,13 +935,42 @@ jobs: - put: slack-alert params: <<: *slack-success-params +- name: jdk19-run-system-tests + serial: true + public: true + plan: + - get: ci-image-jdk19 + - get: git-repo + - get: paketo-builder-base-image + trigger: true + - get: daily + trigger: true + - do: + - task: run-system-tests + image: ci-image-jdk19 + privileged: true + timeout: ((task-timeout)) + file: git-repo/ci/tasks/run-system-tests.yml + params: + BRANCH: ((branch)) + TOOLCHAIN_JAVA_VERSION: 19 + <<: *gradle-enterprise-task-params + <<: *docker-hub-task-params + on_failure: + do: + - put: slack-alert + params: + <<: *slack-fail-params + - put: slack-alert + params: + <<: *slack-success-params groups: - name: "builds" - jobs: ["build", "jdk11-build", "jdk17-build", "jdk18-build", "windows-build"] + jobs: ["build", "jdk11-build", "jdk17-build", "jdk18-build", "jdk19-build", "windows-build"] - name: "releases" jobs: ["stage-milestone", "stage-rc", "stage-release", "promote-milestone", "promote-rc", "promote-release", "create-github-release", "publish-gradle-plugin", "publish-to-sdkman", "update-homebrew-tap"] - name: "system-tests" - jobs: ["run-system-tests", "jdk11-run-system-tests", "jdk17-run-system-tests", "jdk18-run-system-tests"] + jobs: ["run-system-tests", "jdk11-run-system-tests", "jdk17-run-system-tests", "jdk18-run-system-tests", "jdk19-run-system-tests"] - name: "ci-images" jobs: ["build-ci-images", "detect-docker-updates", "detect-jdk-updates", "detect-ubuntu-image-updates"] - name: "pull-requests"