File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 22
33function run_analysis {
44 # extra analysis parameters are set in the 'sonar-project.properties'
5- pysonar \
6- -Dsonar.host.url=" $SONAR_HOST_URL " \
7- -Dsonar.token=" $SONAR_TOKEN " \
8- -Dsonar.analysis.buildNumber=$CI_BUILD_NUMBER \
9- -Dsonar.analysis.pipeline=" $PIPELINE_ID " \
10- -Dsonar.analysis.sha1=" $GIT_SHA1 " \
11- -Dsonar.analysis.repository=" $GITHUB_REPO " \
12- " $@ "
5+ 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+ " $@ "
25+ fi
1326}
1427
1528# generic environment variables
You can’t perform that action at this time.
0 commit comments