简体   繁体   English

声纳运行器未创建数据库条目

[英]Sonar-runner not creating database entries

I am using sonar runner with Jenkins to analyse a PHP project. 我与Jenkins一起使用声纳运行程序来分析PHP项目。 The analysis seems to work fine and all of the reports are created by sonar-runner, however, the data does not show up on the dashboard. 分析似乎运行良好,并且所有报告均由声纳运行器创建,但是数据未显示在仪表板上。

Configuration: 组态:

sonar.projectKey=$Git_feature_branch
sonar.branch=$Git_feature_branch
sonar.projectName=XXXXXX
sonar.projectVersion=$Git_feature_branch-${BUILD_ID}
sonar.projectDescription=PHP Web Sonar Build
sonar.sources=${WORKSPACE}/XXXXXX/Bundles
sonar.tests=${WORKSPACE}/XXXXXX/Bundles/Bundle1/Tests
sonar.phpUnit.configuration=${WORKSPACE}/XXXXXX/app/phpunit.xml.dist
sonar.language=php
sonar.sourceEncoding=UTF-8
sonar.dynamicAnalysis=true
sonar.host.url=http://localhost:9001
sonar.jdbc.url=jdbc:mysql://quality.XXXXXX.com:3306/sonarqube?useUnicode=true&characterEncoding=utf8&rewriteBatchedStatements=true
sonar.jdbc.username=XXXXXX
sonar.jdbc.password=XXXXXX
sonar.host.url=https://quality.XXXXXX.com
sonar.phpPmd.reportPath=${WORKSPACE}/.sonar/phpmd.xml
sonar.phpCodesniffer.reportPath=${WORKSPACE}/.sonar/phpcs.xml
sonar.phpUnit.reportPath=${WORKSPACE}/.sonar/phpunit.xml
sonar.phpUnit.coverage.reportPath=${WORKSPACE}/.sonar/phpunit.coverage.xml  

(I added the last four lines to try and force the reports but it didn't work). (我添加了最后四行来尝试强制执行报告,但没有用)。 All of these reports contain data. 所有这些报告均包含数据。 However, when I go to the sonar dashboard for this project I have rules compliance of 100% and 0% unit test coverage (both incorrect from the reports). 但是,当我进入该项目的声纳仪表板时,我有100%和0%单元测试覆盖率的规则合规性(两者在报告中均不正确)。

Check the SonarQube settings.I had once the same problem. 检查SonarQube设置。我曾经遇到过同样的问题。 It came out, i was working on two databases. 结果出来了,我正在研究两个数据库。 So SonarQube was fetching data from the "empty" one. 因此,SonarQube正在从“空”数据库中获取数据。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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