Must-share information (formatted with Markdown):
-
which versions are you using (SonarQube, Scanner, Plugin, and any relevant extension)
sonarsource/sonar-scanner-cli:4.3 -
what are you trying to achieve
Trying to run analysis and push the xml reports to enterprise sonarqube for python, Also want my project to be created on fly say in this scenario I want the testing project to be created after executing below commands…
Note: I have provide my right token in the export SONAR_LOGIN, and also the right SONAR_HOST_URL -
what have you tried so far to achieve this
After running the below steps on the container…
export SONAR_HOST_URL=https://sonar.dev.XXXXX.XXXX.XXXX.XXX
export SONAR_LOGIN=XXXXXXXXXXXXXXXXXX
export SONAR_LANG=python
sonar-scanner -X -Dsonar.projectKey=testing
-Dsonar.sources=. -Dsonar.sources.inclusions=/.py
-Dsonar.c.file.suffixes=-
-Dsonar.cpp.file.suffixes=-
-Dsonar.objc.file.suffixes=-
-Dsonar.python.coverage.reportPaths=‘report/unit_test_coverage.xml’
-Dsonar.tests=. -Dsonar.test.inclusions='/test_*.py’ -Dsonar.test.exclusions=/vendor/**
-Dsonar.python.xunit.skipDetails=true
-Dsonar.python.xunit.reportPath=report/junit_test_result.xml
-Dsonar.projectVersion=testingv1
-Dsonar.login=${SONAR_LOGIN}
-Dsonar.host.url=${SONAR_HOST_URL}
Below is the error, I am getting even after trying with multiple login values…
23:42:24.874 DEBUG: POST 403 https://sonar.dev.XXXX.XXXX.XXXX.XXX/api/XX/submit?projectKey=XXXXX | time=37ms
23:42:24.879 DEBUG: stylelint-bridge server will shutdown
23:42:29.899 INFO: ------------------------------------------------------------------------
23:42:29.899 INFO: EXECUTION FAILURE
23:42:29.899 INFO: ------------------------------------------------------------------------
23:42:29.899 INFO: Total time: 52.669s
23:42:30.896 INFO: Final Memory: 309M/734M
23:42:30.896 INFO: ------------------------------------------------------------------------
23:42:30.896 ERROR: Error during SonarScanner execution
You’re not authorized to run analysis. Please contact the project administrator.