Skip to content

Commit eefd081

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

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

Jenkinsfile

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,16 +61,18 @@ pipeline {
6161
}
6262
steps {
6363
script {
64+
String jdkHome = sh(script: 'echo ${SONAR_JDK_HOME}', returnStdout: true).trim()
6465
withSonarQubeEnv {
6566
sh """
66-
mvn ${SONAR_MAVEN_GOAL} -Dsonar.projectKey=Silverpeas_Silverpeas-Components \\
67+
JAVA_HOME=$jdkHome mvn ${SONAR_MAVEN_GOAL} \\
68+
-Dsonar.projectKey=Silverpeas_Silverpeas-Components \\
6769
-Dsonar.organization=silverpeas \\
6870
-Dsonar.pullrequest.branch=${env.BRANCH_NAME} \\
6971
-Dsonar.pullrequest.key=${env.CHANGE_ID} \\
7072
-Dsonar.pullrequest.base=master \\
7173
-Dsonar.pullrequest.provider=github \\
7274
-Dsonar.host.url=${SONAR_HOST_URL} \\
73-
-Dsonar.login=${SONAR_AUTH_TOKEN} \\
75+
-Dsonar.token=${SONAR_AUTH_TOKEN} \\
7476
-Dsonar.scanner.force-deprecated-java-version=true
7577
"""
7678
}

0 commit comments

Comments
 (0)