2016-12-23 6 views
1

TeamCityとSonarQubeの統合に関するMSBuildの問題があります。 SonarQube初期TeamCity for .NETでのSonarQubeの統合C#projecs

MSBuild.SonarQube.Runner.exe begin 
/k:"tsmm-%sonar.project%" 
/n:"%sonar.project%" 
/v:"%sonar.project.version%" 
/d:sonar.host.url="%sonar.host.url%" 
/d:sonar.cs.dotcover.reportsPaths="coverage-report.html" 
/d:sonar.cs.nunit.reportsPaths="nunit-results.xml" 
/d:sonar.verbose=true 
/d:sonar.jdbc.username="%sonar.jdbc.username%" 
/d:sonar.jdbc.password="%sonar.jdbc.password%" 
/d:sonar.jdbc.url="%sonar.jdbc.url%" 

2 - - Muggetsはrestauration

3 - のMSBuild

4 - テストを経由し

1:

基本的SonarQubeを使用して私たちのナイトリービルドは5つの段階に分かれていますNUnit

5 - 結果の公開それはノーステップに到達するまで

MSBuild.SonarQube.Runner.exe end 
/d:sonar.scm.disabled=true 
/d:sonar.jdbc.username="%sonar.jdbc.username%" 
/d:sonar.jdbc.password="%sonar.jdbc.password%" 

SonarQube

にチームシティーは、上記のビルド定義を実行しているときに、すべてがうまく行っています。ビルドログに記載されているように5:

Step 5/5: Publish to SonarQube (Command Line) 
ERROR: Error during Sonar runner execution 
org.sonar.runner.impl.RunnerException: Unable to execute Sonar 
at org.sonar.runner.impl.BatchLauncher$1.delegateExecution(BatchLauncher.java:91) 
... 
Caused by: org.sonar.api.utils.SonarException: SCM URL should be provided. Please review "sonar.scm.url" parameter (or the <scm> section of pom.xml if you are using Maven). 

私はそこに公式1を含むさまざまなリソースを経て:http://docs.sonarqube.org/display/SCAN/Analyzing+with+SonarQube+Scanner+for+MSBuild

しかし、任意の適切な説明を見つけるために管理することができませんでした、私はまた、SCMサポートを無効にしてみましたそのページに記載されているとおり:http://docs.sonarqube.org/display/SONAR/SCM+support 手順1に/d:sonar.scm.disabled=trueを追加しても、何も変更されません。

+0

どのSonarQubeプラグインを使用しますか? –

答えて

0

sonar.jdbc。*プロパティは古いバージョンのSonarQubeのみであり、5.4より新しいバージョンの場合は設定しないでください。 SonarQubeへの認証に

あなたは以下の記事で説明したように、sonar.loginとsonar.passwordプロパティを使用する必要があります。すべてのケースで http://docs.sonarqube.org/display/SCAN/From+the+Command+Line#FromtheCommandLine-Analyzeaproject

、古いSonarQubeを持っている場合、私は強くアップグレードをお勧めしますLTS(長期サポート)バージョン: https://www.sonarqube.org/downloads/