I'm trying to setup SonarQube for my open source project but I've difficulties to automatize the process with my CI (AppVeyor).
SonarQube analysis failed with no more details except that I have to look at the log. But I don't know where to look at to find them. I've tried to do remote on the AppVeyor VM but I haven't anything relevant. Logs in the .sonarqube
folder contain no more information that the one printed on the AppVeyor output.
Since it's the first time I tried to add SonarQube to a project, I have no clue where to look at. I've searched the error on internet without success.
Here is a part of the error I get on AppVeyor output:
[exec] 14:14:38.867 INFO: Analysis report generated in 421ms, dir size=436 KB
[exec] 14:14:39.012 INFO: Analysis reports compressed in 143ms, zip size=230 KB
[exec] 14:14:39.012 INFO: Analysis report generated in C:\projects\markify\src\.sonarqube\out\.sonar\scanner-report
[exec] 14:14:39.012 DEBUG: Upload report
[exec] 14:14:39.225 DEBUG: POST 403 https://sonarcloud.io/api/ce/submit?projectKey=Markify&projectName=Markify | time=212ms
[exec] 14:14:39.234 INFO: ------------------------------------------------------------------------
[exec] 14:14:39.234 INFO: EXECUTION FAILURE
[exec] ##teamcity[buildProblem description='Analysis Failed: Check Build Log']]
[exec] 14:14:39.234 INFO: ------------------------------------------------------------------------
[exec] 14:14:39.234 INFO: Total time: 35.907s
[exec] 14:14:39.324 ERROR: Error during SonarQube Scanner execution
[exec] 14:14:39.324 ERROR: Insufficient privileges
[exec] 14:14:39.324 ERROR:
[exec] 14:14:39.324 ERROR: Re-run SonarQube Scanner using the -X switch to enable full debug logging.
[exec] 14:14:39.323 INFO: Final Memory: 69M/168M
[exec] 14:14:39.324 INFO: ------------------------------------------------------------------------
[exec] 14:14:39.324 DEBUG: Execution getVersion
[exec] 14:14:39.325 DEBUG: Execution stop
[exec] Process returned exit code 1
[exec] The SonarQube Scanner did not complete successfully
[exec] 14:14:39.535 Creating a summary markdown file...
[exec] 14:14:39.537 Post-processing failed. Exit code: 1
[exec] [EndPhase] : Failed. Check Log
[exec] ##teamcity[buildProblem description='sonar-scanner return non 0 error code']]
[exec] [CxxSonarQubeMsbuidRunner] Failed analyze project, check log
BUILD FAILED
And here a build where the analysis has failed : https://ci.appveyor.com/project/Takumii/markify/build/1.0.501
The project can be found here : https://github.com/Julien-Pires/Markify/tree/sonarqube
I'm using NAnt to execute the Sonarqube analysis. All parameters used for Sonarqube can be found here: https://github.com/Julien-Pires/Markify/blob/sonarqube/default.build