使用Build Breaker时,在TeamCity中运行SonarQube会导致堆栈转储中断

时间:2015-09-29 11:54:35

标签: sonarqube teamcity sonar-runner sonarqube5.1 teamcity-9.0

我们使用msbuild.sonar.runner在TeamCity构建中运行SonarQube,后者又运行声纳运行器。 为了在质量门文件时打破构建,我们一直在尝试使用Build Breaker插件。当没有问题时,构建按预期运行,但是 当出现Build Break错误时,会出现执行错误:

[08:14:32][Step 3/4] ERROR: Error during Sonar runner execution
[08:14:32][Step 3/4] org.sonar.runner.impl.RunnerException: Unable to execute Sonar
[08:14:32][Step 3/4]    at org.sonar.runner.impl.BatchLauncher$1.delegateExecution(BatchLauncher.java:91)
[08:14:32][Step 3/4]    at org.sonar.runner.impl.BatchLauncher$1.run(BatchLauncher.java:75)
[08:14:32][Step 3/4]    at java.security.AccessController.doPrivileged(Native Method)
[08:14:32][Step 3/4]    at org.sonar.runner.impl.BatchLauncher.doExecute(BatchLauncher.java:69)
[08:14:32][Step 3/4]    at org.sonar.runner.impl.BatchLauncher.execute(BatchLauncher.java:50)
[08:14:32][Step 3/4]    at org.sonar.runner.api.EmbeddedRunner.doExecute(EmbeddedRunner.java:102)
[08:14:32][Step 3/4]    at org.sonar.runner.api.Runner.execute(Runner.java:100)
[08:14:32][Step 3/4]    at org.sonar.runner.Main.executeTask(Main.java:70)
[08:14:32][Step 3/4]    at org.sonar.runner.Main.execute(Main.java:59)
[08:14:32][Step 3/4]    at org.sonar.runner.Main.main(Main.java:53)
[08:14:32][Step 3/4] Caused by: org.sonar.api.utils.SonarException: Alert thresholds have been hit (1 times).
[08:14:32][Step 3/4]    at org.sonar.api.batch.BuildBreaker.fail(BuildBreaker.java:34)
[08:14:32][Step 3/4]    at org.sonar.plugins.buildbreaker.AlertBreaker.analyseMeasures(AlertBreaker.java:57)

我确信这不是预期的行为,但它阻止我们部署这些版本来有效监控SonarQube问题

1 个答案:

答案 0 :(得分:0)

这就是Build Breaker 插件所做的事情 - 它会破坏你的构建。 :)

由'引起的'消息告诉您原因:警报阈值已被命中(1次)。