Skip to content

Commit

Permalink
Add JDK18 variant to CI pipeline
Browse files Browse the repository at this point in the history
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 spring-projectsgh-27607
  • Loading branch information
bclozel committed Oct 25, 2021
1 parent e4e667a commit 65bf5f7
Show file tree
Hide file tree
Showing 3 changed files with 54 additions and 7 deletions.
3 changes: 2 additions & 1 deletion ci/images/ci-image/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
FROM ubuntu:focal-20210827
FROM ubuntu:focal-20211006

ADD setup.sh /setup.sh
ADD get-jdk-url.sh /get-jdk-url.sh
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
13 changes: 8 additions & 5 deletions ci/images/get-jdk-url.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
45 changes: 44 additions & 1 deletion ci/pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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"
Expand Down

0 comments on commit 65bf5f7

Please sign in to comment.