diff --git a/ci/images/setup.sh b/ci/images/setup.sh index ae07b52b03..5183bfcb9b 100755 --- a/ci/images/setup.sh +++ b/ci/images/setup.sh @@ -27,6 +27,7 @@ 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 diff --git a/ci/pipeline.yml b/ci/pipeline.yml index 2eab896b52..675bb6e5bd 100644 --- a/ci/pipeline.yml +++ b/ci/pipeline.yml @@ -457,7 +457,14 @@ jobs: - do: - task: build-project 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: do: - put: repo-status-jdk16-build diff --git a/ci/scripts/build-project.sh b/ci/scripts/build-project.sh index 726ea1a429..56e0ad28e8 100755 --- a/ci/scripts/build-project.sh +++ b/ci/scripts/build-project.sh @@ -6,8 +6,7 @@ repository=$(pwd)/distribution-repository pushd git-repo > /dev/null 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 ./gradlew -Dorg.gradle.internal.launcher.welcomeMessageEnabled=false --no-daemon --max-workers=4 -PdeploymentRepository=${repository} build publishAllPublicationsToDeploymentRepository fi diff --git a/ci/scripts/get-toolchain-java-version.sh b/ci/scripts/get-toolchain-java-version.sh deleted file mode 100755 index 1223f22ac7..0000000000 --- a/ci/scripts/get-toolchain-java-version.sh +++ /dev/null @@ -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}'