Skip to content

Commit a762ff9

Browse files
committed
fix
1 parent 078d291 commit a762ff9

File tree

1 file changed

+14
-20
lines changed

1 file changed

+14
-20
lines changed

.cirrus/analysis.sh

Lines changed: 14 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,22 @@
11
#!/bin/bash
22

33
function run_analysis {
4-
# extra analysis parameters are set in the 'sonar-project.properties'
4+
# deal with strange SonarQube configuration for the US region
5+
SONAR_REGION=""
56
if [ "$SONAR_HOST_URL" == "https://sonarqube.us" ]; then
6-
# deal with strange SonarQube configuration for the US region
7-
pysonar \
8-
-Dsonar.host.url="$SONAR_HOST_URL" \
9-
-Dsonar.region=us \
10-
-Dsonar.token="$SONAR_TOKEN" \
11-
-Dsonar.analysis.buildNumber=$CI_BUILD_NUMBER \
12-
-Dsonar.analysis.pipeline="$PIPELINE_ID" \
13-
-Dsonar.analysis.sha1="$GIT_SHA1" \
14-
-Dsonar.analysis.repository="$GITHUB_REPO" \
15-
"$@"
16-
else
17-
pysonar \
18-
-Dsonar.host.url="$SONAR_HOST_URL" \
19-
-Dsonar.token="$SONAR_TOKEN" \
20-
-Dsonar.analysis.buildNumber=$CI_BUILD_NUMBER \
21-
-Dsonar.analysis.pipeline="$PIPELINE_ID" \
22-
-Dsonar.analysis.sha1="$GIT_SHA1" \
23-
-Dsonar.analysis.repository="$GITHUB_REPO" \
24-
"$@"
7+
SONAR_REGION="-Dsonar.region=us"
258
fi
9+
10+
# extra analysis parameters are set in the 'sonar-project.properties'
11+
pysonar \
12+
-Dsonar.host.url="$SONAR_HOST_URL" \
13+
${SONAR_REGION} \
14+
-Dsonar.token="$SONAR_TOKEN" \
15+
-Dsonar.analysis.buildNumber=$CI_BUILD_NUMBER \
16+
-Dsonar.analysis.pipeline="$PIPELINE_ID" \
17+
-Dsonar.analysis.sha1="$GIT_SHA1" \
18+
-Dsonar.analysis.repository="$GITHUB_REPO" \
19+
"$@"
2620
}
2721

2822
# generic environment variables

0 commit comments

Comments
 (0)