mirror of
https://github.com/spring-projects/spring-boot.git
synced 2024-08-29 03:06:45 +08:00
Merge pull request #25519 from dreis2211
* gh-25519: Polish "Add Java 16 CI pipeline" Add Java 16 CI pipeline Closes gh-25519
This commit is contained in:
commit
ff5a6d9a2e
12
ci/images/ci-image-jdk16/Dockerfile
Normal file
12
ci/images/ci-image-jdk16/Dockerfile
Normal file
@ -0,0 +1,12 @@
|
||||
FROM ubuntu:focal-20210119
|
||||
|
||||
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 java16
|
||||
|
||||
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
|
||||
java15)
|
||||
echo "https://github.com/AdoptOpenJDK/openjdk15-binaries/releases/download/jdk-15.0.2%2B7/OpenJDK15U-jdk_x64_linux_hotspot_15.0.2_7.tar.gz"
|
||||
;;
|
||||
java16)
|
||||
echo "https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk16-2021-03-04-10-39/OpenJDK16-jdk_x64_linux_hotspot_2021-03-04-10-39.tar.gz"
|
||||
;;
|
||||
*)
|
||||
echo $"Unknown java version"
|
||||
exit 1
|
||||
|
@ -26,6 +26,16 @@ curl -L ${JDK_URL} | tar zx --strip-components=1
|
||||
test -f /opt/openjdk/bin/java
|
||||
test -f /opt/openjdk/bin/javac
|
||||
|
||||
if [[ $# -eq 2 ]]; then
|
||||
cd /
|
||||
TOOLCHAIN_JDK_URL=$( ./get-jdk-url.sh $2 )
|
||||
|
||||
mkdir -p /opt/openjdk-toolchain
|
||||
cd /opt/openjdk-toolchain
|
||||
curl -L ${TOOLCHAIN_JDK_URL} | tar zx --strip-components=1
|
||||
test -f /opt/openjdk-toolchain/bin/java
|
||||
test -f /opt/openjdk-toolchain/bin/javac
|
||||
fi
|
||||
|
||||
###########################################################
|
||||
# DOCKER
|
||||
|
@ -162,6 +162,12 @@ resources:
|
||||
source:
|
||||
<<: *registry-image-resource-source
|
||||
repository: ((docker-hub-organization))/spring-boot-ci-jdk15
|
||||
- name: ci-image-jdk16
|
||||
type: registry-image
|
||||
icon: docker
|
||||
source:
|
||||
<<: *registry-image-resource-source
|
||||
repository: ((docker-hub-organization))/spring-boot-ci-jdk16
|
||||
- name: artifactory-repo
|
||||
type: artifactory-resource
|
||||
icon: package-variant
|
||||
@ -194,6 +200,14 @@ resources:
|
||||
access_token: ((github-ci-status-token))
|
||||
branch: ((branch))
|
||||
context: jdk15-build
|
||||
- name: repo-status-jdk16-build
|
||||
type: github-status-resource
|
||||
icon: eye-check-outline
|
||||
source:
|
||||
repository: ((github-repo-name))
|
||||
access_token: ((github-ci-status-token))
|
||||
branch: ((branch))
|
||||
context: jdk16-build
|
||||
- name: slack-alert
|
||||
type: slack-notification
|
||||
icon: slack
|
||||
@ -243,6 +257,13 @@ jobs:
|
||||
image: ci-image-jdk15
|
||||
vars:
|
||||
ci-image-name: ci-image-jdk15
|
||||
- task: build-ci-image-jdk16
|
||||
privileged: true
|
||||
file: git-repo/ci/tasks/build-ci-image.yml
|
||||
output_mapping:
|
||||
image: ci-image-jdk16
|
||||
vars:
|
||||
ci-image-name: ci-image-jdk16
|
||||
- in_parallel:
|
||||
- put: ci-image
|
||||
params:
|
||||
@ -253,6 +274,9 @@ jobs:
|
||||
- put: ci-image-jdk15
|
||||
params:
|
||||
image: ci-image-jdk15/image.tar
|
||||
- put: ci-image-jdk16
|
||||
params:
|
||||
image: ci-image-jdk16/image.tar
|
||||
- name: detect-jdk-updates
|
||||
plan:
|
||||
- get: git-repo
|
||||
@ -278,6 +302,12 @@ jobs:
|
||||
params:
|
||||
<<: *github-task-params
|
||||
JDK_VERSION: java15
|
||||
- task: detect-jdk16-update
|
||||
image: ci-image
|
||||
file: git-repo/ci/tasks/detect-jdk-updates.yml
|
||||
params:
|
||||
<<: *github-task-params
|
||||
JDK_VERSION: java16
|
||||
- name: detect-ubuntu-image-updates
|
||||
plan:
|
||||
- get: git-repo
|
||||
@ -415,6 +445,38 @@ jobs:
|
||||
- put: slack-alert
|
||||
params:
|
||||
<<: *slack-success-params
|
||||
- name: jdk16-build
|
||||
serial: true
|
||||
public: true
|
||||
plan:
|
||||
- get: ci-image-jdk16
|
||||
- get: git-repo
|
||||
trigger: true
|
||||
- put: repo-status-jdk16-build
|
||||
params: { state: "pending", commit: "git-repo" }
|
||||
- do:
|
||||
- task: build-project
|
||||
image: ci-image-jdk16
|
||||
privileged: true
|
||||
timeout: ((task-timeout))
|
||||
file: git-repo/ci/tasks/build-project.yml
|
||||
params:
|
||||
BRANCH: ((branch))
|
||||
TOOLCHAIN_JAVA_VERSION: 16
|
||||
<<: *gradle-enterprise-task-params
|
||||
<<: *docker-hub-task-params
|
||||
on_failure:
|
||||
do:
|
||||
- put: repo-status-jdk16-build
|
||||
params: { state: "failure", commit: "git-repo" }
|
||||
- put: slack-alert
|
||||
params:
|
||||
<<: *slack-fail-params
|
||||
- put: repo-status-jdk16-build
|
||||
params: { state: "success", commit: "git-repo" }
|
||||
- put: slack-alert
|
||||
params:
|
||||
<<: *slack-success-params
|
||||
- name: windows-build
|
||||
serial: true
|
||||
plan:
|
||||
@ -638,7 +700,7 @@ jobs:
|
||||
repository: updated-homebrew-tap-repo
|
||||
groups:
|
||||
- name: "builds"
|
||||
jobs: ["build", "jdk11-build", "jdk15-build", "windows-build"]
|
||||
jobs: ["build", "jdk11-build", "jdk15-build", "jdk16-build", "windows-build"]
|
||||
- name: "releases"
|
||||
jobs: ["stage-milestone", "stage-rc", "stage-release", "promote-milestone", "promote-rc", "promote-release", "create-github-release", "publish-to-sdkman", "update-homebrew-tap"]
|
||||
- name: "ci-images"
|
||||
|
@ -5,5 +5,9 @@ source $(dirname $0)/common.sh
|
||||
repository=$(pwd)/distribution-repository
|
||||
|
||||
pushd git-repo > /dev/null
|
||||
./gradlew -Dorg.gradle.internal.launcher.welcomeMessageEnabled=false --no-daemon --max-workers=4 -PdeploymentRepository=${repository} build publishAllPublicationsToDeploymentRepository
|
||||
if [[ -d /opt/openjdk-toolchain ]]; then
|
||||
./gradlew -Dorg.gradle.internal.launcher.welcomeMessageEnabled=false --no-daemon --max-workers=4 -PdeploymentRepository=${repository} build publishAllPublicationsToDeploymentRepository -PtoolchainVersion=${TOOLCHAIN_JAVA_VERSION} -Porg.gradle.java.installations.auto-detect=false -Porg.gradle.java.installations.auto-download=false -Porg.gradle.java.installations.paths=/opt/openjdk-toolchain/
|
||||
else
|
||||
./gradlew -Dorg.gradle.internal.launcher.welcomeMessageEnabled=false --no-daemon --max-workers=4 -PdeploymentRepository=${repository} build publishAllPublicationsToDeploymentRepository
|
||||
fi
|
||||
popd > /dev/null
|
||||
|
@ -20,6 +20,10 @@ case "$JDK_VERSION" in
|
||||
BASE_URL="https://api.adoptopenjdk.net/v3/assets/feature_releases/15/ga"
|
||||
ISSUE_TITLE="Upgrade Java 15 version in CI image"
|
||||
;;
|
||||
java16)
|
||||
BASE_URL="https://api.adoptopenjdk.net/v3/assets/feature_releases/16/ea"
|
||||
ISSUE_TITLE="Upgrade Java 16 version in CI image"
|
||||
;;
|
||||
*)
|
||||
echo $"Unknown java version"
|
||||
exit 1;
|
||||
|
Loading…
Reference in New Issue
Block a user