This is a pre-production deployment of Warehouse, however changes made here WILL affect the production instance of PyPI.
Latest Version Dependencies status unknown Test status unknown Test coverage unknown
Project Description

Run command on GitHub and BitBucket POST request hooks.

Install

You can install hooked in a virtualenv (with virtualenvwrapper and pip):

$ mkvirtualenv hooked
(hooked) $ pip install hooked

Or if you want to contribute some patches to hooked:

$ git clone git@github.com:bbinet/hooked.git
$ cd hooked/
$ mkvirtualenv hooked
(hooked) $ python setup.py develop

Configure

Create a configuration file that looks like:

$ cat path/to/config.cfg

[server]
host = 0.0.0.0
port = 8080
server = cherrypy
debug = true

[hook-myrepo]
repository = myrepo
branch = master
command = /path/to/script.sh

[hook-all]
#repository = # will match all repository
#branch = # will match all branches
command = /path/to/other/script.sh

Note that the [server] section is optional, the defaults are:

[server]
host = localhost
port = 8888
server = wsgiref
debug = false

Run

Run the hooked server by running the following command:

(hooked) $ hooked path/to/config.cfg

Then visit http://localhost:8888/, it should return the current configuration for this hooked server. If this works, you are ready to configure GitHub and BitBucket POST request web hooks to your hooked server listening address, for example: http://localhost:8888/.

See:

You can also manually run hooks though GET requests:

  • requesting the /hooks/<repo>/<branch> url will run all hooks that match repository=<repo> and branch=<branch>
  • requesting the /hook/<hook> url will run the hook which name is <hook>

Release

To make a new release, do the following steps:

$ vi setup.py  # bump version
$ git add setup.py
$ git commit -m "bump version to X.X.X"
$ git tag vX.X.X
$ git push --tags
$ python setup.py sdist upload

Thanks

Thanks to the hook-server and githook projects for inspiration.

Release History

Release History

0.2

This version

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.1

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

Download Files

Download Files

TODO: Brief introduction on what you do with files - including link to relevant help section.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
hooked-0.2.tar.gz (4.7 kB) Copy SHA256 Checksum SHA256 Source Jan 13, 2015

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS HPE HPE Development Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting