Once you install the SonarQube extension for VSTS/TFS you can setup service endpoint type of SonarQube.
This endpoint requires a token as shown below. Server URL is the URL of your Sonar Server.
To generate a token go to Sonar server and create a user named like ProjectFeeder (can be any name) with following sonar-users permissions. By default all users get create project and execute analysis permissions that is sufficient to execute analysis with TFS/VSTS builds..
Logout from admin user and login with project feeder user to generate a token.On My Account of the Project Feeder user, in the security tab provide a name and generate a token. Then use that token in TFS/VSTS service endpoint.
The extension makes new tasks available in task catalogue. SonarQube Scanner CLI allows to analyze PHP, JavaScript etc. projects. New Begin Analysis and End Analysis allows to use with .Net projects analyzing C#, JavaScript etc. as explained in Setup SonarQube Analysis with TFS Builds.
Once a build is setup sonar analysis and queued the build summary provides a link to the analysis results. Quality gate status is shown in the build summary.
Link will take you to the Sonar Server details of the analysis. You can drill down each item in the Sonar Server dashboard.
1 comment:
When running "SonarQube Scanner CLI" vNext build task, I get "Path to tslint.json and tsconfig.json configuration files either not defined or not found" when trying to analyze typescript .ts files. How do you specify tslint.json? I tried specifying a Settings File SonarQube.Analysis.xml with sonar.ts.tslintconfigpath value in Advanced section of the task without success. We have TFS 2015 Update 3 and SonarQube 5.6.6 with SonarTS plugin. Thanks.
Post a Comment