From 5e8313f8be9521d47f79b30a76f90c0135a5758c Mon Sep 17 00:00:00 2001 From: KnightMiner Date: Thu, 23 May 2024 17:41:33 -0400 Subject: [PATCH] Update jenkinsfile for Java 17 --- Jenkinsfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 25dace72..11a9725d 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -11,7 +11,7 @@ pipeline { stage('Build') { steps { - sh "./gradlew build -PBUILD_NUMBER=${env.BUILD_NUMBER} --no-daemon" + sh "JAVA_HOME=${env.JDK_17} ./gradlew build -PBUILD_NUMBER=${env.BUILD_NUMBER} --no-daemon" } } @@ -24,7 +24,7 @@ pipeline { stage('Deploy') { steps { - sh "./gradlew publishMavenJavaPublicationToMavenRepository -PBUILD_NUMBER=${env.BUILD_NUMBER} -PDEPLOY_DIR=${env.MAVEN_DEPLOY_DIR} --no-daemon" + sh "JAVA_HOME=${env.JDK_17} ./gradlew publishMavenJavaPublicationToMavenRepository -PBUILD_NUMBER=${env.BUILD_NUMBER} -PDEPLOY_DIR=${env.MAVEN_DEPLOY_DIR} --no-daemon" } } }