我已经为声纳质量门和代码覆盖率配置了Jenkins Job。以下是Jenkins的工作设置。当我触发构建时,我看到下面的错误。由于这个问题,我的大多数Jenkins工作都失败了。请帮帮我。
Jenkins工作设置
错误记录
ERROR: Error during SonarQube Scanner execution
java.lang.IllegalStateException: Error at line 2 of coverage report C:\Location.xml
at org.sonar.plugins.coverage.generic.GenericCoverageSensor.loadReport(GenericCoverageSensor.java:130)
at org.sonar.plugins.coverage.generic.GenericCoverageSensor.analyseWithLogger(GenericCoverageSensor.java:95)
at org.sonar.plugins.coverage.generic.GenericCoverageSensor.analyse(GenericCoverageSensor.java:91)
at org.sonar.plugins.coverage.generic.ReportParser.parse(ReportParser.java:82)
at org.sonar.plugins.coverage.generic.GenericCoverageSensor.loadReport(GenericCoverageSensor.java:126)
... 31 more
ERROR:
ERROR: Re-run SonarQube Scanner using the -X switch to enable full debug logging.
The SonarQube Scanner did not complete successfully
21:44:09.12 Creating a summary markdown file...
21:44:09.122 Post-processing failed. Exit code: 1
答案 0 :(得分:0)
答案就在日志中: org.sonar.plugins.dotnet.tests.ParseErrorException:在第2行的C:\ UC \ ProductEligibility \ BTS \ results.xml中缺少根元素'test-results'
因此results.xml不是有效的xml并导致解析错误并导致分析失败。因此无论创建该文件是什么,最终都会导致问题。
尝试删除该参数以验证分析现在是否正确运行。