File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11#! /bin/bash
22
33function 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
You can’t perform that action at this time.
0 commit comments