【问题标题】:Jenkins + Sonar: ERROR: Error during SonarQube Scanner execution java.lang.IllegalStateException: Project does not pass the quality gateJenkins + Sonar:错误:SonarQube Scanner 执行期间出错 java.lang.IllegalStateException:项目未通过质量门
【发布时间】:2017-03-27 21:44:04
【问题描述】:

我正在尝试将 Sonar 集成到 Jenkins 中。由于一些糟糕的代码质量 - 它给出了以下错误。

"错误:SonarQube 扫描仪执行期间出错 java.lang.IllegalStateException:项目没有通过质量 门。”

我目前无权更改质量门。无论质量门结果如何,我都希望构建成功。怎么做?

【问题讨论】:

    标签: jenkins sonarqube


    【解决方案1】:

    看来你已经安装了https://github.com/SonarQubeCommunity/sonar-build-breaker所以要么卸载它,要么尝试设置sonar.buildbreaker.skip=true。另请注意,SonarQube 开发人员不建议破坏构建 - http://www.sonarqube.org/why-you-shouldnt-use-build-breaker/

    【讨论】:

      【解决方案2】:

      前面的答案是正确的,但我无权访问设置。此外,即使我有权访问,我也不想更改全局策略或服务器设置。 幸运的是,我可以修改运行扫描仪的脚本。在开始命令(无论您使用什么方法来执行开始命令)中添加标志以跳过构建中断。

      sonar.buildbreaker.skip=true

      通常以以下形式添加:

      /dLsonar.buildbreaker.skip=true

      【讨论】:

        猜你喜欢
        • 2016-07-05
        • 2017-09-18
        • 2017-01-26
        • 1970-01-01
        • 2017-03-28
        • 2018-03-30
        • 2017-01-24
        • 2018-03-21
        相关资源
        最近更新 更多