Polish "Add Java 16 CI pipeline"

See gh-25519
pull/25523/head
Andy Wilkinson 4 years ago
parent d89739cc78
commit 24e957b052

@ -27,6 +27,7 @@ test -f /opt/openjdk/bin/java
test -f /opt/openjdk/bin/javac test -f /opt/openjdk/bin/javac
if [[ $# -eq 2 ]]; then if [[ $# -eq 2 ]]; then
cd /
TOOLCHAIN_JDK_URL=$( ./get-jdk-url.sh $2 ) TOOLCHAIN_JDK_URL=$( ./get-jdk-url.sh $2 )
mkdir -p /opt/openjdk-toolchain mkdir -p /opt/openjdk-toolchain

@ -457,7 +457,14 @@ jobs:
- do: - do:
- task: build-project - task: build-project
image: ci-image-jdk16 image: ci-image-jdk16
<<: *build-project-task-params 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: on_failure:
do: do:
- put: repo-status-jdk16-build - put: repo-status-jdk16-build

@ -6,8 +6,7 @@ repository=$(pwd)/distribution-repository
pushd git-repo > /dev/null pushd git-repo > /dev/null
if [[ -d /opt/openjdk-toolchain ]]; then if [[ -d /opt/openjdk-toolchain ]]; then
toolchain_java_version=$( ./$(dirname $0)/get-toolchain-java-version.sh ) ./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/
./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 else
./gradlew -Dorg.gradle.internal.launcher.welcomeMessageEnabled=false --no-daemon --max-workers=4 -PdeploymentRepository=${repository} build publishAllPublicationsToDeploymentRepository ./gradlew -Dorg.gradle.internal.launcher.welcomeMessageEnabled=false --no-daemon --max-workers=4 -PdeploymentRepository=${repository} build publishAllPublicationsToDeploymentRepository
fi fi

@ -1,4 +0,0 @@
#!/bin/bash
set -e
/opt/openjdk-toolchain/bin/java -XshowSettings:properties -version 2>&1 | grep "java.specification.version" | awk '{split($0,parts,"="); print parts[2]}' | awk '{$1=$1;print}'
Loading…
Cancel
Save