This docker image hosts a webhook receiver for GoCD.
Currently onyl one webhook for Gitea is configured. But any other Git server can be added easily to hooks.json. See documentation on how to define hooks.
For GoCD API authorisation an admin-user's access token is required. See documentation. The GoCD material URL has to match the URL sent with the webhook to shedule the material for update.
docker run \
--name webhook \
-p 9000:9000 \
-e SECRET="WEBHOOK_SECRET" \
-e GO_API_TOKEN="GO_ADMIN_USER_TOKEN" \
-e GO_SERVER_URL="http://gocd-server:8153" \
ugrawert/gocd-webhooks
To serve secure content using HTTPS, you need to provide the following parameters:
docker run \
--name webhook \
-p 9000:9000 \
-e SECRET="WEBHOOK_SECRET" \
-e GO_API_TOKEN="GO_ADMIN_USER_TOKEN" \
-e GO_SERVER_URL="http://gocd-server:8153" \
-secure \
-cert /path/to/cert.pem \
-key /path/to/key.pem \
ugrawert/gocd-webhooks
Either configure a global webhook via Site Administration -> Default Webhooks or configure webhooks per repository Settings -> Webhooks.
| Parameter | Value |
|---|---|
| Target URL | http://webhook:9000/hooks/gitea |
| HTTP Method | POST |
| Content Type | application/json |
| Secret | WEBHOOK_SECRET |
docker run \
--name webhook \
-p 9000:9000 \
-e SECRET="WEBHOOK_SECRET" \
-e GO_API_TOKEN="GO_ADMIN_USER_TOKEN" \
-e GO_SERVER_URL="http://gocd-server:8153" \
ugrawert/gocd-webhooks -template -hooks=/opt/webhook/hooks.json -verbose
Content type
Image
Digest
Size
10.1 MB
Last updated
about 7 years ago
docker pull ugrawert/gocd-webhooks