[英]Pre-commit hook for Git when Hudson build has failed
I'm trying to figure out how to write a pre-commit hook for Git
that checks the status of my Hudson
build. 我正在试图弄清楚如何为
Git
编写一个预提交钩子来检查我的Hudson
构建的状态。 If the previous build failed, it should disallow anyone from committing without first writing a specific line, eg "fixed build." 如果先前的构建失败,则应该禁止任何人在没有首先编写特定行的情况下提交,例如“固定构建”。
EDIT: 编辑:
The first answerer has provided one side of the coin: the Hudson API. 第一个回答者提供了硬币的一面:Hudson API。
I now need the other side. 我现在需要另一面。 How do I write the pre-commit hook in
Git
? 如何在
Git
编写预提交钩子?
As mentioned in this blog post , Hudson has a discoverable API, through its Remote Access API . 正如本博文中所提到的 ,Hudson通过其远程访问API具有可发现的API 。
http://myhudson.example.com/job/MyJob/api
By using a combination of: 通过使用以下组合:
you can extract the status of the latest build. 您可以提取最新版本的状态。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.