In the post Setup SonarQube Analysis with TFS Builds usage of Sonar Server with TFS build to measure quality of code is explained. The task catalogue tasks explained in the post Setup SonarQube Analysis with TFS Builds are now deprecated. There is an extension available in marketplace for SonarQube. This extension provide new begin analysis and end analysis tasks to be used in a TFS build.
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.
Monday 20 February 2017
Subscribe to:
Post Comments (Atom)
Popular Posts
-
In Azure DevOps YAML pipelines there are several functions available for you to use. replace is such a useful function, which you can use t...
-
Adding Azure Container Registry (ACR) service connection to Azure DevOps is really simple as described in " Create Service Connection ...
-
We have discueed, that we have to use an environment variable to handle input parameter default values, if we are using trigger for workflo...
-
Some times a silly mistake can waste lot of time of a developer. The exception “System.IO.IOException: The response ended prematurely.” whil...
-
Sometimes you may need to edit files especially the web.config or appsettings.json files after deploying your application to Azure App Servi...
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