2009-07-31 05:23:10 |
Michael Rooney |
description |
The post-commit hook is a powerful thing which allows actions such as building and/or testing the software to be automated and provide immediate feedback to the appropriate people. Most VCS allow for this and github provides hooks for this as well, so there is a strong precedent for this, if not a regression of hosting code on Launchpad.
The idea is fairly simple: provide a textbox from the code page which is configured at the project level, allowing for a URL to be specified. This URL will then be POSTed to with certain information such as the branch, revision, author, and log message.
Use cases include:
* Integration with a continuous integration system such as Hudson/CruiseControl. In the URL box I would put http://myserver/build?job=myproject
* Performing arbitrary commands on any machining listening for such messages over HTTP such as a deployment server
HTTP is a great choice because it is simple to implement, already a well understood concept by many, and plenty of services are already listening on HTTP and as such would be actionable on Launchpad commits without modification. There's also a nice python library for webhooks available called hookah: http://blog.webhooks.org/2009/03/02/announcing-hookah-the-web-hook-event-dispatcher/ . |
The post-commit hook is a powerful thing which allows actions such as building and/or testing the software to be automated and provide immediate feedback to the appropriate people. Most VCS allow for this and github provides hooks for this as well, so there is a strong precedent for this, if not a regression of hosting code on Launchpad.
The idea is fairly simple: provide a textbox from the code page which is configured at the project level, allowing for a URL to be specified. This URL will then be POSTed to with certain information such as the branch, revision, author, and log message.
Use cases include:
* Integration with a continuous integration system such as Hudson/CruiseControl. In the URL box I would put http://myserver/build?job=myproject
* Posting to a scriptlet (http://www.scriptlets.org/) and performing arbitrary commands such as tweeting based on commit messages
* Telling a mirror /
* Performing arbitrary commands on any machining listening for such messages over HTTP such as a deployment server
HTTP is a great choice because it is simple to implement, already a well understood concept by many, and plenty of services are already listening on HTTP and as such would be actionable on Launchpad commits without modification. There's also a nice python library for webhooks available called hookah: http://blog.webhooks.org/2009/03/02/announcing-hookah-the-web-hook-event-dispatcher/ .
Web Hook wiki: http://webhooks.pbworks.com/
GitHub guide: http://github.com/guides/post-receive-hooks
|
|