gpt4 book ai didi

android - Gradle Sonar runner : fail build on failed Quality Gate

转载 作者:搜寻专家 更新时间:2023-11-01 08:39:27 28 4
gpt4 key购买 nike

作为 Team City 构建的一部分,我正在我的 Android 代码上执行 Gradle SonarRunner 任务。

它在 SonarQube 上失败了 Quality Gate,但控制台构建成功并且日志中没有关于失败的 QG 的信息:

[10:57:35][Step 1/3] 10:57:36.323 INFO  - Loaded quality gate 'Android'
[10:57:36][Step 1/3] 10:57:36.397 INFO - Compare to previous analysis (2015-12-07)
[10:57:36][Step 1/3] 10:57:36.405 INFO - Compare over 30 days (2015-11-08, analysis of Thu Nov 26 13:27:50 CET 2015)
[10:57:36][Step 1/3] 10:57:36.411 INFO - Compare to previous version (2015-12-07)
[10:57:36][Step 1/3] 10:57:36.642 INFO - Execute decorators...
[10:58:19][Step 1/3] 10:58:20.189 INFO - Store results in database
[10:58:59][Step 1/3] 10:59:00.330 INFO - Analysis reports generated in 2698ms, dir size=4 MB
[10:59:09][Step 1/3] 10:59:09.888 INFO - Analysis reports compressed in 9558ms, zip size=3 MB
[10:59:09][Step 1/3] 10:59:10.245 INFO - Analysis reports sent to server in 357ms
[10:59:09][Step 1/3] 10:59:10.245 INFO - ANALYSIS SUCCESSFUL, you can browse [###############]
[10:59:09][Step 1/3] 10:59:10.245 INFO - Note that you will be able to access the updated dashboard once the server has processed the submitted analysis report.
[10:59:10][Step 1/3] INFO: ------------------------------------------------------------------------
[10:59:10][Step 1/3] INFO: EXECUTION SUCCESS
[10:59:10][Step 1/3] INFO: ------------------------------------------------------------------------
[10:59:10][Step 1/3] Total time: 6:05.725s
[10:59:10][Step 1/3] Final Memory: 44M/1294M
[10:59:10][Step 1/3] INFO: ------------------------------------------------------------------------
[10:59:10][Step 1/3]
[10:59:10][Step 1/3] BUILD SUCCESSFUL

我想通过失败的 Gradle 任务或至少检查日志中的某些特定失败消息(例如“ANALYSIS FAILED”)来识别此类事件。我怎样才能做到这一点?

最佳答案

您没有提及您的 SonarQube 服务器版本。中断构建在当前服务器版本 5.2 中不可用,但在 v5.1 和之前可用 the Build Breaker Plugin , 和 native 支持 should return soon .

关于android - Gradle Sonar runner : fail build on failed Quality Gate,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34153961/

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