Skip to content

Commit b58f008

Browse files
committed
Take into account sonar analysis can be executed only with Java > 17
1 parent aab9d06 commit b58f008

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Jenkinsfile

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,9 +72,11 @@ pipeline {
7272
}
7373
steps {
7474
script {
75+
String jdkHome = sh(script: 'echo ${SONAR_JDK_HOME}', returnStdout: true).trim()
7576
withSonarQubeEnv {
7677
sh """
77-
mvn ${SONAR_MAVEN_GOAL} -Dsonar.projectKey=Silverpeas_Silverpeas-Looks \\
78+
JAVA_HOME=$jdkHome mvn ${SONAR_MAVEN_GOAL} \\
79+
-Dsonar.projectKey=Silverpeas_Silverpeas-Looks \\
7880
-Dsonar.organization=silverpeas \\
7981
-Dsonar.pullrequest.branch=${env.BRANCH_NAME} \\
8082
-Dsonar.pullrequest.key=${env.CHANGE_ID} \\

0 commit comments

Comments
 (0)