简体   繁体   中英

Jenkins Sonarqube scanner results not display

I have installed the sonarqube scanner plugin in jenkins and added the below properties in execute sonarqube scanner in the build section of jenkins instance.

# Project identification
sonar.projectKey=BUS.App
sonar.projectVersion=Test
sonar.projectName=BUS App

# Info required for Sonar 
sonar.sources=.
sonar.language=cs 

#Core C# Settings
sonar.dotnet.visualstudio.solution.file=BUS.Platform2.sln
sonar.dotnet.excludeGeneratedCode=true

#----- Default source code encoding
sonar.sourceEncoding=UTF-8

After the build completion of the instance in sonar server it shows the correct analysis time but doesn't shows the analytics results.

I did the analysis in my project using SonarMSBuild (not in jenkins locally in the project folder), it shows the results correctly.

This is how the sonar server after jekins build. 声纳结果

Does my sonar scanner properties are wrong? or did I missed something?

This is how my build section looks in jenkins configure. 在此处输入图片说明

That's not how you analyze C#. As described in the docs You need

  • SonarQube Scanner for MSBuild - Begin Analysis
  • Build
  • SonarQube Scanner for MSBuild - End Analysis

You'll pass a couple properties in to the Begin Analysis step, but by and large you don't need those properties.

And you particularly don't need sonar.language which was deprecated years ago.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM