Skip to content

Commit 056f817

Browse files
dreis2211wilkinsona
authored andcommitted
Add CI pipeline for JDK 17
See gh-27366
1 parent 530d17c commit 056f817

File tree

4 files changed

+82
-1
lines changed

4 files changed

+82
-1
lines changed

ci/images/ci-image-jdk17/Dockerfile

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
FROM ubuntu:focal-20210713
2+
3+
ADD setup.sh /setup.sh
4+
ADD get-jdk-url.sh /get-jdk-url.sh
5+
ADD get-docker-url.sh /get-docker-url.sh
6+
RUN ./setup.sh java8 java17
7+
8+
ENV JAVA_HOME /opt/openjdk
9+
ENV PATH $JAVA_HOME/bin:$PATH
10+
ADD docker-lib.sh /docker-lib.sh
11+
12+
ENTRYPOINT [ "switch", "shell=/bin/bash", "--", "codep", "/bin/docker daemon" ]

ci/images/get-jdk-url.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@ case "$1" in
1111
java16)
1212
echo "https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk-16.0.1%2B9/OpenJDK16U-jdk_x64_linux_hotspot_16.0.1_9.tar.gz"
1313
;;
14+
java17)
15+
echo "https://github.com/AdoptOpenJDK/openjdk17-binaries/releases/download/jdk-2021-05-07-13-31/OpenJDK-jdk_x64_linux_hotspot_2021-05-06-23-30.tar.gz"
16+
;;
1417
*)
1518
echo $"Unknown java version"
1619
exit 1

ci/pipeline.yml

Lines changed: 63 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,12 @@ resources:
165165
source:
166166
<<: *registry-image-resource-source
167167
repository: ((docker-hub-organization))/spring-boot-ci-jdk16
168+
- name: ci-image-jdk17
169+
type: registry-image
170+
icon: docker
171+
source:
172+
<<: *registry-image-resource-source
173+
repository: ((docker-hub-organization))/spring-boot-ci-jdk17
168174
- name: artifactory-repo
169175
type: artifactory-resource
170176
icon: package-variant
@@ -197,6 +203,14 @@ resources:
197203
access_token: ((github-ci-status-token))
198204
branch: ((branch))
199205
context: jdk16-build
206+
- name: repo-status-jdk17-build
207+
type: github-status-resource
208+
icon: eye-check-outline
209+
source:
210+
repository: ((github-repo-name))
211+
access_token: ((github-ci-status-token))
212+
branch: ((branch))
213+
context: jdk17-build
200214
- name: slack-alert
201215
type: slack-notification
202216
icon: slack
@@ -246,6 +260,13 @@ jobs:
246260
image: ci-image-jdk16
247261
vars:
248262
ci-image-name: ci-image-jdk16
263+
- task: build-ci-image-jdk17
264+
privileged: true
265+
file: git-repo/ci/tasks/build-ci-image.yml
266+
output_mapping:
267+
image: ci-image-jdk17
268+
vars:
269+
ci-image-name: ci-image-jdk17
249270
- in_parallel:
250271
- put: ci-image
251272
params:
@@ -256,6 +277,9 @@ jobs:
256277
- put: ci-image-jdk16
257278
params:
258279
image: ci-image-jdk16/image.tar
280+
- put: ci-image-jdk17
281+
params:
282+
image: ci-image-jdk17/image.tar
259283
- name: detect-jdk-updates
260284
plan:
261285
- get: git-repo
@@ -281,6 +305,12 @@ jobs:
281305
params:
282306
<<: *github-task-params
283307
JDK_VERSION: java16
308+
- task: detect-jdk17-update
309+
image: ci-image
310+
file: git-repo/ci/tasks/detect-jdk-updates.yml
311+
params:
312+
<<: *github-task-params
313+
JDK_VERSION: java17
284314
- name: detect-ubuntu-image-updates
285315
plan:
286316
- get: git-repo
@@ -425,6 +455,38 @@ jobs:
425455
- put: slack-alert
426456
params:
427457
<<: *slack-success-params
458+
- name: jdk17-build
459+
serial: true
460+
public: true
461+
plan:
462+
- get: ci-image-jdk17
463+
- get: git-repo
464+
trigger: true
465+
- put: repo-status-jdk17-build
466+
params: { state: "pending", commit: "git-repo" }
467+
- do:
468+
- task: build-project
469+
image: ci-image-jdk17
470+
privileged: true
471+
timeout: ((task-timeout))
472+
file: git-repo/ci/tasks/build-project.yml
473+
params:
474+
BRANCH: ((branch))
475+
TOOLCHAIN_JAVA_VERSION: 17
476+
<<: *gradle-enterprise-task-params
477+
<<: *docker-hub-task-params
478+
on_failure:
479+
do:
480+
- put: repo-status-jdk17-build
481+
params: { state: "failure", commit: "git-repo" }
482+
- put: slack-alert
483+
params:
484+
<<: *slack-fail-params
485+
- put: repo-status-jdk17-build
486+
params: { state: "success", commit: "git-repo" }
487+
- put: slack-alert
488+
params:
489+
<<: *slack-success-params
428490
- name: windows-build
429491
serial: true
430492
plan:
@@ -670,7 +732,7 @@ jobs:
670732
repository: updated-homebrew-tap-repo
671733
groups:
672734
- name: "builds"
673-
jobs: ["build", "jdk11-build", "jdk16-build", "windows-build"]
735+
jobs: ["build", "jdk11-build", "jdk16-build", "jdk17-build", "windows-build"]
674736
- name: "releases"
675737
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"]
676738
- name: "ci-images"

ci/scripts/detect-jdk-updates.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,10 @@ case "$JDK_VERSION" in
2020
BASE_URL="https://api.adoptopenjdk.net/v3/assets/feature_releases/16/ga"
2121
ISSUE_TITLE="Upgrade Java 16 version in CI image"
2222
;;
23+
java17)
24+
BASE_URL="https://api.adoptopenjdk.net/v3/assets/feature_releases/17/ea"
25+
ISSUE_TITLE="Upgrade Java 17 version in CI image"
26+
;;
2327
*)
2428
echo $"Unknown java version"
2529
exit 1;

0 commit comments

Comments
 (0)