Skip to content

Commit 97a9677

Browse files
authored
HIVE-29180: SonarQube reports issues unrelated to changes in the pull request (#6063)
The reason is that the base branch (master) did not have a valid scan for over a month since the SonnarScanner was consistently failing with OutOfMemoryError.
1 parent f9a969c commit 97a9677

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
@@ -119,9 +119,11 @@ def sonarAnalysis(args) {
119119
-Dsonar.host.url=https://sonarcloud.io \
120120
"""+args+" -DskipTests -Dit.skipTests -Dmaven.javadoc.skip"
121121

122+
// Sonar scanner runs in a separate JVM so JAVA_OPTS (notably heap size)
123+
// must be passed via the appropriate environment variable
122124
sh """#!/bin/bash -e
123125
sw java 21 && . /etc/profile.d/java.sh
124-
export MAVEN_OPTS=-Xmx5G
126+
export SONAR_SCANNER_JAVA_OPTS=-Xmx8g
125127
"""+mvnCmd
126128
}
127129
}

0 commit comments

Comments
 (0)