声纳运行器不创建数据库条目 [英] Sonar-runner not creating database entries

查看:71
本文介绍了声纳运行器不创建数据库条目的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在与Jenkins一起使用声纳运行器来分析PHP项目.该分析似乎运行良好,并且所有报告均由声纳运行器创建,但是数据未显示在仪表板上.

I am using sonar runner with Jenkins to analyse a PHP project. 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.

配置:

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  

(我添加了最后四行来尝试强制执行报告,但是没有用).所有这些报告均包含数据.但是,当我进入该项目的声纳仪表板时,我有100%和0%单元测试覆盖率的规则合规性(两者在报告中均不正确).

(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).

推荐答案

检查SonarQube设置.我曾经遇到过同样的问题.结果出来了,我正在两个数据库上工作.因此,SonarQube正在从空"数据库中获取数据.

Check the SonarQube settings.I had once the same problem. It came out, i was working on two databases. So SonarQube was fetching data from the "empty" one.

这篇关于声纳运行器不创建数据库条目的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆