Example webhook listener to rerun Nomad jobs when triggered. Assumes Consul KV store integration.
Pulls hooks.json configuration from Consul KV gomad/hooks.json.
$ nomad run hooks/gomad.nomad
$ curl -X POST \
'http://gomad.nomad.mydomain.example/hooks/redeploy-gomad?token=SUPER_SECRET' \
-H 'cache-control: no-cache' \
-H 'content-type: application/json' \
-d '{
"pushdata": {
"tag": "latest"
}
}'
You will need to configure your routes to make this service accessible. pushdata.tag is for Docker Hub webhooks.
Content type
Image
Digest
Size
97.3 MB
Last updated
almost 9 years ago
docker pull gyng/gomad