Hi team,
code coverage showing 0% in sonarqube console for .net build. please help me what need to add in jenkinsfile.
in jenkins file
stage(“SonarQube”) {
steps {
withSonarQubeEnv('SonarQube') { //SONAR_HOST_URL and SONAR_AUTH_TOKEN injected via plugin
withCredentials([string(credentialsId: 'sonar-pmi', variable: 'API_KEY')]) {
bat "\"${SONAR_HOME}\\SonarScanner.MSBuild.exe\" begin /k:${SONAR_PROJECT_KEY} /d:sonar.host.url=\"${SONAR_HOST}\" /d:sonar.login=\"${API_KEY}\""
bat "\"${MSBUILD_HOME}\\msbuild.exe\" rffafpptApp.sln /t:Rebuild"
bat "\"${SONAR_HOME}\\SonarScanner.MSBuild.exe\" end /d:sonar.login=\"${API_KEY}\""
}
}