mirror of
https://github.com/spring-projects/spring-boot.git
synced 2024-08-29 03:06:45 +08:00
Add CI pipeline for JDK 17
See gh-27366
This commit is contained in:
parent
530d17cf7e
commit
056f817ba2
12
ci/images/ci-image-jdk17/Dockerfile
Normal file
12
ci/images/ci-image-jdk17/Dockerfile
Normal file
@ -0,0 +1,12 @@
|
||||
FROM ubuntu:focal-20210713
|
||||
|
||||
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 java17
|
||||
|
||||
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" ]
|
@ -11,6 +11,9 @@ case "$1" in
|
||||
java16)
|
||||
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"
|
||||
;;
|
||||
java17)
|
||||
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"
|
||||
;;
|
||||
*)
|
||||
echo $"Unknown java version"
|
||||
exit 1
|
||||
|
@ -165,6 +165,12 @@ resources:
|
||||
source:
|
||||
<<: *registry-image-resource-source
|
||||
repository: ((docker-hub-organization))/spring-boot-ci-jdk16
|
||||
- name: ci-image-jdk17
|
||||
type: registry-image
|
||||
icon: docker
|
||||
source:
|
||||
<<: *registry-image-resource-source
|
||||
repository: ((docker-hub-organization))/spring-boot-ci-jdk17
|
||||
- name: artifactory-repo
|
||||
type: artifactory-resource
|
||||
icon: package-variant
|
||||
@ -197,6 +203,14 @@ resources:
|
||||
access_token: ((github-ci-status-token))
|
||||
branch: ((branch))
|
||||
context: jdk16-build
|
||||
- name: repo-status-jdk17-build
|
||||
type: github-status-resource
|
||||
icon: eye-check-outline
|
||||
source:
|
||||
repository: ((github-repo-name))
|
||||
access_token: ((github-ci-status-token))
|
||||
branch: ((branch))
|
||||
context: jdk17-build
|
||||
- name: slack-alert
|
||||
type: slack-notification
|
||||
icon: slack
|
||||
@ -246,6 +260,13 @@ jobs:
|
||||
image: ci-image-jdk16
|
||||
vars:
|
||||
ci-image-name: ci-image-jdk16
|
||||
- task: build-ci-image-jdk17
|
||||
privileged: true
|
||||
file: git-repo/ci/tasks/build-ci-image.yml
|
||||
output_mapping:
|
||||
image: ci-image-jdk17
|
||||
vars:
|
||||
ci-image-name: ci-image-jdk17
|
||||
- in_parallel:
|
||||
- put: ci-image
|
||||
params:
|
||||
@ -256,6 +277,9 @@ jobs:
|
||||
- put: ci-image-jdk16
|
||||
params:
|
||||
image: ci-image-jdk16/image.tar
|
||||
- put: ci-image-jdk17
|
||||
params:
|
||||
image: ci-image-jdk17/image.tar
|
||||
- name: detect-jdk-updates
|
||||
plan:
|
||||
- get: git-repo
|
||||
@ -281,6 +305,12 @@ jobs:
|
||||
params:
|
||||
<<: *github-task-params
|
||||
JDK_VERSION: java16
|
||||
- task: detect-jdk17-update
|
||||
image: ci-image
|
||||
file: git-repo/ci/tasks/detect-jdk-updates.yml
|
||||
params:
|
||||
<<: *github-task-params
|
||||
JDK_VERSION: java17
|
||||
- name: detect-ubuntu-image-updates
|
||||
plan:
|
||||
- get: git-repo
|
||||
@ -425,6 +455,38 @@ jobs:
|
||||
- put: slack-alert
|
||||
params:
|
||||
<<: *slack-success-params
|
||||
- name: jdk17-build
|
||||
serial: true
|
||||
public: true
|
||||
plan:
|
||||
- get: ci-image-jdk17
|
||||
- get: git-repo
|
||||
trigger: true
|
||||
- put: repo-status-jdk17-build
|
||||
params: { state: "pending", commit: "git-repo" }
|
||||
- do:
|
||||
- task: build-project
|
||||
image: ci-image-jdk17
|
||||
privileged: true
|
||||
timeout: ((task-timeout))
|
||||
file: git-repo/ci/tasks/build-project.yml
|
||||
params:
|
||||
BRANCH: ((branch))
|
||||
TOOLCHAIN_JAVA_VERSION: 17
|
||||
<<: *gradle-enterprise-task-params
|
||||
<<: *docker-hub-task-params
|
||||
on_failure:
|
||||
do:
|
||||
- put: repo-status-jdk17-build
|
||||
params: { state: "failure", commit: "git-repo" }
|
||||
- put: slack-alert
|
||||
params:
|
||||
<<: *slack-fail-params
|
||||
- put: repo-status-jdk17-build
|
||||
params: { state: "success", commit: "git-repo" }
|
||||
- put: slack-alert
|
||||
params:
|
||||
<<: *slack-success-params
|
||||
- name: windows-build
|
||||
serial: true
|
||||
plan:
|
||||
@ -670,7 +732,7 @@ jobs:
|
||||
repository: updated-homebrew-tap-repo
|
||||
groups:
|
||||
- name: "builds"
|
||||
jobs: ["build", "jdk11-build", "jdk16-build", "windows-build"]
|
||||
jobs: ["build", "jdk11-build", "jdk16-build", "jdk17-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: "ci-images"
|
||||
|
@ -20,6 +20,10 @@ case "$JDK_VERSION" in
|
||||
BASE_URL="https://api.adoptopenjdk.net/v3/assets/feature_releases/16/ga"
|
||||
ISSUE_TITLE="Upgrade Java 16 version in CI image"
|
||||
;;
|
||||
java17)
|
||||
BASE_URL="https://api.adoptopenjdk.net/v3/assets/feature_releases/17/ea"
|
||||
ISSUE_TITLE="Upgrade Java 17 version in CI image"
|
||||
;;
|
||||
*)
|
||||
echo $"Unknown java version"
|
||||
exit 1;
|
||||
|
Loading…
Reference in New Issue
Block a user