私のすべてのプロジェクトでSonarQube 5.6.1を使用したコード解析にJenkins 1.642.2を使用しています。SonarQubeポストビルドアクションは廃止されました
私はMavenのゴールソナーを使用します。彼らは(ファイルで7秒以上)ファイルを解析するために多くの時間を取るソナーを:
[INFO] Sensor SCM Sensor
[INFO] SCM provider for this project is: svn
[INFO] 1079 files to be analyzed
[INFO]
[INFO] 2/1079 files analyzed
[INFO] 3/1079 files analyzed
[INFO] 4/1079 files analyzed
[INFO] 5/1079 files analyzed
私はSonarQubeスキャナを使用して、この設定を聖霊降臨祭:
その後、私はこのエラーがあります:
WARN: Property 'sonar.jdbc.url' is not supported any more. It will be ignored. There is no longer any DB connection to the SQ database.
WARN: Property 'sonar.jdbc.username' is not supported any more. It will be ignored. There is no longer any DB connection to the SQ database.
WARN: Property 'sonar.jdbc.password' is not supported any more. It will be ignored. There is no longer any DB connection to the SQ database.
INFO: User cache: /var/lib/jenkins/.sonar/cache
INFO: Load plugins index
INFO: Load plugins index (done) | time=43ms
INFO: SonarQube server 5.6.1
INFO: Default locale: "en_US", source code encoding: "UTF-8" (analysis is platform dependent)
INFO: Process project properties
INFO: ---------------------------------------------------------------------- --
INFO: EXECUTION FAILURE
INFO: ------------------------------------------------------------------------
INFO: Total time: 1.621s
INFO: Final Memory: 39M/132M
INFO: ------------------------------------------------------------------------
ERROR: Error during SonarQube Scanner execution
ERROR: You must define the following mandatory properties for 'Unknown': sonar.projectKey, sonar.projectName, sonar.projectVersion, sonar.sources
ERROR:
ERROR: Re-run SonarQube Scanner using the -X switch to enable full debug logging.
Build step 'Execute SonarQube Scanner' marked build as failure
Finished: FAILURE
私の設定ファイル:
<profile>
<id>sonar</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<properties>
<sonar.jdbc.url>
jdbc:mysql://11.230.5.88:3306/sonar
</sonar.jdbc.url>
<sonar.jdbc.username>sonar</sonar.jdbc.username>
<sonar.jdbc.password>sonar</sonar.jdbc.password>
<!-- Optional URL to server. Default value is http://localhost:9000 -->
<sonar.host.url>
http://sonarqube-groupe.com/
</sonar.host.url>
</properties>
</profile>
この問題を解決するための任意のアイデア私は新しいsonarqubeの使用を理解するために問題を抱えているので
私必要がありますmavenプロジェクト用のsonar-project.propertiesファイルを作成しますか?
これでいいですが、分析中の遅さの問題はまだあります。ソナーレベの新しいバージョンに関連していますか? このプロジェクトのために [INFO] SCMプロバイダは次のとおりです。 を分析しようとするのsvn [INFO] 1079個のファイル[INFO] [INFO] 1079分の2つのファイルは、/ [INFO] 4 を解析し [INFO] 1079分の3つのファイルを解析し1079個のファイルが [INFO] 1079分の7つのファイルを解析し [INFO] 1079分の5つのファイルが [INFO] 1079分の6つのファイルを解析して分析 [INFO] 1079分の8つのファイルを解析し [INFO] 1079分の9つのファイルを解析し、[ を分析しましたINFO]分析された10/1079ファイル [情報] 11/1079ファイルが解析されました [INFO] 13/1079ファイルが分析されました – Inforedaster
なぜ私の仕事にこのような「SonarQubeの準備環境」がないのかが分かりました。グローバルJenkins設定で、 "SonarQubeサーバー構成のビルド環境変数としての注入を有効にする"というフラグが設定されている場合にのみ表示されます。 – dokaspar
ありがとう@dokaspar。私はそれを含める答えを拡大しました。 –