git push hooks from GitHub, BitBucket, gitea, and gogs; for these it can automatically update checkouts. It also recognises Sentry notifications, and of course regular calls.
Assuming you already are inside a virtualenv:
pip install webhaak
Create a new virtualenv (if you are not already in one) and install the necessary packages:
git clone https://github.com/aquatix/webhaak.git cd webhaak mkvirtualenv webhaak # or whatever project you are working on pip install -r requirements.txt
settings.py from example_config to the parent directory and
configure to your needs. Create a yaml file with the projects to serve (see
next section) and refer to this file from the settings.py.
Run webhaak as a service under nginx or apache and call the appropriate url's when wanted (e.g., on push to repository).
Url's are of the form https://hook.example.com/app/<appkey>/<triggerkey>
See the example hook settings for syntax of how to configure repositories, commands and directories.
Call webhaak on its endpoint
/getappkey to generate a random new key for
usage in the projects yaml file (so, for example https://hook.example.com/getappkey)
By default, webhaak clones projects in a directory under its
REPOS_CACHE_DIR directory, but there is support for a per-repo parent dir
This means that webhaak then doesn't clone this repo into its default cache
dir, but in a subdirectory of the directory configured in
<repoparent>/reponame (e.g., /srv/customparent/myproject).
See the Changelog.