Commit capture for Git when Hudson build fails

I am trying to figure out how to write a pre-commit hook for Git that checks the status of my Hudson build. If the previous assembly failed, it should not prevent anyone from making transactions without first recording a specific line, for example. "fixed build."

EDIT:

The first responder provided one side of the coin: the Hudson API.

Now I need the other side. How to write a pre-commit hook in Git ?

+6
git github pre-commit-hook continuous-integration hudson
source share
1 answer

As mentioned in this post, Hudson has an API for discovery through the remote access API .

 http://myhudson.example.com/job/MyJob/api 

Using a combination of:

  • wget (available on Unix or Windows)
  • parsing

you can extract the status of the last build.

+2
source share

All Articles