File tree Expand file tree Collapse file tree 1 file changed +11
-6
lines changed Expand file tree Collapse file tree 1 file changed +11
-6
lines changed Original file line number Diff line number Diff line change 3131 localbuild=" false"
3232fi
3333
34- external_format=" v2"
34+ if [[ " ${SONAR_HOST_URL} " = " ${SONAR_HOST_URL_9} " ]]; then
35+ external_format=" v1"
36+ auth=" -Dsonar.login=${SONAR_TOKEN} "
37+ else
38+ external_format=" v2"
39+ auth=" "
40+ fi
41+
42+
3543
3644scanOpts=()
3745
4654 ;;
4755 -9)
4856 external_format=" v1"
57+ auth=" -Dsonar.login=${SONAR_TOKEN} "
4958 ;;
5059 -local)
5160 localbuild=" true"
@@ -79,13 +88,9 @@ version=$(grep PACKAGE_VERSION "${ROOTDIR}/sonar/version.py" | cut -d "=" -f 2 |
7988cmd=" sonar-scanner -Dsonar.projectVersion=${version} \
8089 -Dsonar.python.flake8.reportPaths=${flake8Report} \
8190 -Dsonar.python.pylint.reportPaths=${pylintReport} \
82- -Dsonar.token=${SONAR_TOKEN} \
91+ -Dsonar.token=${SONAR_TOKEN} ${auth} \
8392 " ${scanOpts[*]} " "
8493
85- if [[ " ${SONAR_HOST_URL} " = " ${SONAR_HOST_URL} _9" ]]; then
86- cmd=" ${cmd} -Dsonar.login=${SONAR_TOKEN} "
87- fi
88-
8994if ls " ${buildDir} " /coverage* .xml > /dev/null 2>&1 ; then
9095 cmd=" ${cmd} -Dsonar.python.coverage.reportPaths=${buildDir} /coverage*.xml"
9196else
You can’t perform that action at this time.
0 commit comments