Skip to content

Commit

Permalink
Merge branch '2.7.x'
Browse files Browse the repository at this point in the history
  • Loading branch information
wilkinsona committed Mar 9, 2022
2 parents 317d577 + 83de199 commit d552f49
Show file tree
Hide file tree
Showing 5 changed files with 136 additions and 22 deletions.
12 changes: 12 additions & 0 deletions ci/images/ci-image-jdk18/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
FROM ubuntu:focal-20220113

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 java18

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
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ case "$1" in
java17)
echo "https://github.com/adoptium/temurin17-binaries/releases/download/jdk-17.0.2%2B8/OpenJDK17U-jdk_x64_linux_hotspot_17.0.2_8.tar.gz"
;;
java18)
echo "https://github.com/adoptium/temurin18-binaries/releases/download/jdk18-2022-02-15-13-13-beta/OpenJDK18-jdk_x64_linux_hotspot_2022-02-15-13-13.tar.gz"
;;
*)
echo $"Unknown java version"
exit 1
Expand Down
133 changes: 114 additions & 19 deletions ci/pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,12 @@ resources:
source:
<<: *registry-image-resource-source
repository: ((docker-hub-organization))/spring-boot-ci
- name: ci-image-jdk18
type: registry-image
icon: docker
source:
<<: *registry-image-resource-source
repository: ((docker-hub-organization))/spring-boot-ci-jdk18
- name: paketo-builder-base-image
type: registry-image
icon: docker
Expand All @@ -193,6 +199,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 @@ -220,29 +234,49 @@ jobs:
- get: ci-images-git-repo
trigger: true
- get: git-repo
- task: build-ci-image
privileged: true
file: git-repo/ci/tasks/build-ci-image.yml
output_mapping:
image: ci-image
vars:
ci-image-name: ci-image
<<: *docker-hub-mirror-vars
- put: ci-image
params:
image: ci-image/image.tar
- in_parallel:
- task: build-ci-image
privileged: true
file: git-repo/ci/tasks/build-ci-image.yml
output_mapping:
image: ci-image
vars:
ci-image-name: ci-image
<<: *docker-hub-mirror-vars
- task: build-ci-image-jdk18
privileged: true
file: git-repo/ci/tasks/build-ci-image.yml
output_mapping:
image: ci-image-jdk18
vars:
ci-image-name: ci-image-jdk18
<<: *docker-hub-mirror-vars
- in_parallel:
- put: ci-image
params:
image: ci-image/image.tar
- put: ci-image-jdk18
params:
image: ci-image-jdk18/image.tar
- name: detect-jdk-updates
plan:
- get: git-repo
- get: every-wednesday
trigger: true
- get: ci-image
- task: detect-jdk17-update
image: ci-image
file: git-repo/ci/tasks/detect-jdk-updates.yml
params:
<<: *github-task-params
JDK_VERSION: java17
- in_parallel:
- task: detect-jdk17-update
image: ci-image
file: git-repo/ci/tasks/detect-jdk-updates.yml
params:
<<: *github-task-params
JDK_VERSION: java17
- task: detect-jdk18-update
image: ci-image
file: git-repo/ci/tasks/detect-jdk-updates.yml
params:
<<: *github-task-params
JDK_VERSION: java18
- name: detect-ubuntu-image-updates
plan:
- get: git-repo
Expand Down Expand Up @@ -330,6 +364,38 @@ jobs:
params:
path: git-repo
status: failure
- name: jdk18-build
serial: true
public: true
plan:
- get: ci-image-jdk18
- get: git-repo
trigger: true
- put: repo-status-jdk18-build
params: { state: "pending", commit: "git-repo" }
- do:
- task: build-project
image: ci-image-jdk18
privileged: true
timeout: ((task-timeout))
file: git-repo/ci/tasks/build-project.yml
params:
BRANCH: ((branch))
TOOLCHAIN_JAVA_VERSION: 18
<<: *gradle-enterprise-task-params
<<: *docker-hub-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" }
- put: slack-alert
params:
<<: *slack-success-params
- name: windows-build
serial: true
plan:
Expand Down Expand Up @@ -603,13 +669,42 @@ jobs:
- put: slack-alert
params:
<<: *slack-success-params
- name: jdk18-run-system-tests
serial: true
public: true
plan:
- get: ci-image-jdk18
- get: git-repo
- get: paketo-builder-base-image
trigger: true
- get: daily
trigger: true
- do:
- task: run-system-tests
image: ci-image-jdk18
privileged: true
timeout: ((task-timeout))
file: git-repo/ci/tasks/run-system-tests.yml
params:
BRANCH: ((branch))
TOOLCHAIN_JAVA_VERSION: 18
<<: *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", "windows-build"]
jobs: ["build", "jdk18-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"]
jobs: ["run-system-tests", "jdk18-run-system-tests"]
- name: "ci-images"
jobs: ["build-ci-images", "detect-docker-updates", "detect-jdk-updates", "detect-ubuntu-image-updates"]
- name: "pull-requests"
Expand Down
4 changes: 4 additions & 0 deletions ci/scripts/detect-jdk-updates.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@ case "$JDK_VERSION" in
BASE_URL="https://api.adoptium.net/v3/assets/feature_releases/17/ga"
ISSUE_TITLE="Upgrade Java 17 version in CI image"
;;
java18)
BASE_URL="https://api.adoptium.net/v3/assets/feature_releases/18/ea"
ISSUE_TITLE="Upgrade Java 18 version in CI image"
;;
*)
echo $"Unknown java version"
exit 1;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2012-2021 the original author or authors.
* Copyright 2012-2022 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -30,7 +30,7 @@
/**
* Helper class to build Gradle {@link Project Projects} for test fixtures. Wraps
* functionality of Gradle's own {@link ProjectBuilder} in order to workaround an issue on
* JDK 17.
* JDK 17 and 18.
*
* @author Christoph Dreis
* @see <a href="https://github.com/gradle/gradle/issues/16857">Gradle Support JDK 17</a>
Expand Down Expand Up @@ -67,7 +67,7 @@ public Project build() {
if (StringUtils.hasText(this.name)) {
builder.withName(this.name);
}
if (JavaVersion.current() == JavaVersion.VERSION_17) {
if (JavaVersion.current().isCompatibleWith(JavaVersion.VERSION_17)) {
NativeServices.initializeOnClient(userHome);
try {
ProjectBuilderImpl.getGlobalServices();
Expand Down

0 comments on commit d552f49

Please sign in to comment.