TeamCity Plugin - SonarQube Scanner for MSBuild
This is a plugin for Teamcity which brings SonarQube Scanner for MSBuild to Teamcity, and provides you two build steps that makes easy setup begin and end commands.
How To Install?
- Download sonarqube-scanner-msbuild.zip file located in build folder.
- Go to the Administration page on TeamCity, and then go to Plugins List page.
- Click on Upload plugin zip option and upload the zip downloaded in the first step.
- Set these parameters on Root Project level: sonar.server, sonar.user, sonar.password (spec: password display='normal').
Note: Once you have uploaded the plugin zip into TeamCity, after a few minutes the plugin (in TeamCity) and the scanner (in Agents) should be ready. If they don’t appear after two minutes, you may need to restart the TeamCity Service / Build Agent service.
How To Use?
- Go to the build configuration where you want to setup SonarQube Scanner for MSBuild.
- Add a new build step.
- Now, you can able to find two new runner types: SonarQube Begin Analysis and SonarQube End Analysis.
- From here on you can follow the official documentation: https://docs.sonarqube.org/display/SCAN/Analyzing+with+SonarQube+Scanner+for+MSBuild
Note: At this point, we are including the latest version of SonarQube Scanner for MSBuild (184.108.40.2066) https://github.com/SonarSource/sonar-scanner-msbuild/releases Feel free to do a pull request if a new version is released.