Skip to content
Snippets Groups Projects
Commit dc208696 authored by ale's avatar ale
Browse files

Serve webhook on /

Get rid of the useless / handler and move /webhook in its place.
parent 69468cbd
No related branches found
No related tags found
No related merge requests found
...@@ -129,7 +129,7 @@ gitlab-docker-autodep \ ...@@ -129,7 +129,7 @@ gitlab-docker-autodep \
``` ```
You can then configure your project's webhooks with the URL You can then configure your project's webhooks with the URL
`http://localhost:14001/webhook`, with the *Trigger* checkbox set only `http://localhost:14001/`, with the *Trigger* checkbox set only
on *Pipeline events*. on *Pipeline events*.
It can be useful to run the *rebuild* command from a cron job, for It can be useful to run the *rebuild* command from a cron job, for
......
...@@ -113,13 +113,7 @@ def run_app(gitlab_url, registry_hostname, gitlab_token, ...@@ -113,13 +113,7 @@ def run_app(gitlab_url, registry_hostname, gitlab_token,
app.run(host=bind_host, port=bind_port) app.run(host=bind_host, port=bind_port)
@app.route('/') @app.route('/', methods=('POST',))
def app_index():
return make_response(
200, ['<html><body><h1>gitlab-docker-autodep</h1></body></html>'])
@app.route('/webhook', methods=('POST',))
def app_webhook(): def app_webhook():
# Authenticate the request, if configured to do so. # Authenticate the request, if configured to do so.
if app.config['WEBHOOK_AUTH_TOKEN']: if app.config['WEBHOOK_AUTH_TOKEN']:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment