简体   繁体   中英

check if sonar run passed the quality gate on commandline

I am working on creation of pre-commit hook . Before committing the code to repo it will do a sonar run and will not allow commit if code do not pass the quality gate.

I get this link after sonar run is done http://localhost:9000/api/ce/task?id=AVI1VL6M3afNin76yzQz

using curl on this link i can know that sonar run was success or not but how to check if it passed the quality gate or not. How can i find the same on command line.

此主题已添加到昨天 5.3 版本的文档中: http : //docs.sonarqube.org/display/SONAR/Breaking+the+CI+Build

检查这个答案有一个指向 CLI 工具的链接,它可以为任何平台构建并在您的钩子中使用,如果可以在钩子中使用 cURL 等 3-rd 方应用程序是可以的。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM