gpt4 book ai didi

jenkins - 达到阈值时如何修复不稳定的构建?

转载 作者:行者123 更新时间:2023-12-04 02:46:23 25 4
gpt4 key购买 nike

我的总体覆盖率达到了阈值,但构建仍然被标记为不稳定。有谁知道这是什么原因?

16:53:04 [JaCoCo plugin] Thresholds: JacocoHealthReportThresholds [minClass=75, maxClass=99, minMethod=75, maxMethod=99, minLine=75, maxLine=99, minBranch=40, maxBranch=99, minInstruction=65, maxInstruction=99, minComplexity=0, maxComplexity=99]
16:53:04 [JaCoCo plugin] Publishing the results..
16:53:04 [JaCoCo plugin] Loading packages..
16:53:04 [JaCoCo plugin] Done.
16:53:04 [JaCoCo plugin] Overall coverage: class: 89, method: 89, line: 77, branch: 41, instruction: 67
16:53:04 [JaCoCo plugin] Health thresholds: JacocoHealthReportThresholds [minClass=75, maxClass=99, minMethod=75, maxMethod=99, minLine=75, maxLine=99, minBranch=40, maxBranch=99, minInstruction=65, maxInstruction=99, minComplexity=0, maxComplexity=99]
16:53:04 [JaCoCo plugin] Apply Min/Max thresholds result: UNSTABLE

Jacoco report

最佳答案

好的,根据我找到的链接,覆盖率应该高于最小和最大覆盖率。

查看链接 https://issues.jenkins-ci.org/browse/JENKINS-16903 — 报告相同的意外行为。

https://groups.google.com/forum/#!topic/jenkins-jacoco-plugin-mailing-list/pzHm98RJjB8/discussion — 这里是最终宣布的规则:

The configured maximum thresholds are above the actual coverage. If a coverage is below minimum the build fails, if the coverage is below maximum the build is unstable, if it is above then it is a success.

从第二个主题看来,仅指定一个阈值(或仅指定最小值)似乎不起作用。因此,我建议您尝试将 min 和 max 都设置为您预期的最小值。

关于jenkins - 达到阈值时如何修复不稳定的构建?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/57060237/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com