From 319cb636e5721337ebfc8f84529cb15ab1a9c16f Mon Sep 17 00:00:00 2001 From: Alexander Brandes Date: Fri, 12 May 2023 14:46:38 -0700 Subject: [PATCH] Simplify Java location in Jenkinsfile (#2221) --- Jenkinsfile | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index ec2813783..8c6ece0eb 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -4,14 +4,13 @@ pipeline { disableConcurrentBuilds() } stages { - stage('Set JDK 17') { - steps { - tool name: 'Temurin-17.0.6+10', type: 'jdk' - } - } stage('Build') { steps { - sh './gradlew clean build' + withEnv([ + "PATH+JAVA=${tool 'Temurin-17.0.6+10'}/bin" + ]) { + sh './gradlew clean build' + } } } stage('Archive artifacts') {