Skip to content

Commit

Permalink
Add CI pipeline for JDK 17
Browse files Browse the repository at this point in the history
  • Loading branch information
dreis2211 authored and wilkinsona committed Jul 16, 2021
1 parent 530d17c commit 10cc06a
Show file tree
Hide file tree
Showing 4 changed files with 82 additions and 1 deletion.
12 changes: 12 additions & 0 deletions ci/images/ci-image-jdk17/Dockerfile
@@ -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" ]
3 changes: 3 additions & 0 deletions ci/images/get-jdk-url.sh
Expand Up @@ -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
Expand Down
64 changes: 63 additions & 1 deletion ci/pipeline.yml
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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:
Expand All @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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"
Expand Down
4 changes: 4 additions & 0 deletions ci/scripts/detect-jdk-updates.sh
Expand Up @@ -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;
Expand Down

0 comments on commit 10cc06a

Please sign in to comment.