Flask app for triggering Jenkins builds by GitHub webhooks
This solution has been deprecated in favor of github-webhooks-proxy
- clone the repository
- run
virtualenv env
source env/bin/activate
pip install -e .
Can be found in /tests
and run via:
py.test
The server listens on port 8088 by default
$ ./env/bin/webhooks-server
$ curl -v "http://127.0.0.1:8088/github-webhook/" -d @webhooks/examples/push.json -H "X-GitHub-Event: push" -H "Content-Type: application/json"
HTTP 201
: Jenkins jobs were triggered (the list can be empty if there was no match)
{
"jobs_started": [
{
"params": {
"repo": "Wikia/app",
"commit": "4d2ab4e76d0d405d17d1a0f2b8a6071394e3ab40",
"email": "kyle.daigle@github.com",
"branch": "wikia-logger-backtrace-for-errors",
"author": "Kyle Daigle"
},
"name": "sparrow_runner"
}
]
}
HTTP 404
: Jenkins job specified in config.yaml
was not found on Jenkins
{
"error": "Jenkins job was not found: foo_bar"
}
HTTP 501
: internal error