File tree Expand file tree Collapse file tree 1 file changed +14
-20
lines changed Expand file tree Collapse file tree 1 file changed +14
-20
lines changed Original file line number Diff line number Diff line change 1
1
#! /bin/bash
2
2
3
3
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=" "
5
6
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"
25
8
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
+ " $@ "
26
20
}
27
21
28
22
# generic environment variables
You can’t perform that action at this time.
0 commit comments