webhook is a lightweight configurable tool written in Go, that allows you to easily create HTTP endpoints (hooks) on your server, which you can use to execute configured commands.
command-working-directory
value was set to another user’s home folder, so that’s why permission was denied. Haha, pretty obvious in hindsight. Your suggestions led me straight to it, however so thank you. And thanks for webhooks!
bhook] 2017/01/14 16:21:07 os signal watcher ready
Jan 14 16:21:16 ubuntu webhooks[14938]: [webhook] 2017/01/14 16:21:16 bitbucket got matched
Jan 14 16:21:16 ubuntu webhooks[14938]: [webhook] 2017/01/14 16:21:16 error parsing JSON parameters: couldn't retrieve argument for {Source:payload Name:payload EnvName:}
Jan 14 16:21:16 ubuntu webhooks[14938]: [webhook] 2017/01/14 16:21:16 bitbucket got matched, but didn't get triggered because the trigger rules were not satisfied
Jan 14 16:21:16 ubuntu webhooks[14938]: [webhook] 2017/01/14 16:21:16 2017-01-14T16:21:16Z | 200 | 260.824762ms | prodeers.com:9999 | POST /hooks/bitbucket
Jan 14 16:21:57 ubuntu webhooks[14938]: [webhook] 2017/01/14 16:21:57 bitbucket got matched
error parsing JSON parameters: couldn't retrieve argument for
parse-parameters-as-json
?
[
{
"id": "updatehook",
"execute-command": "/path-to-shell-script/update.sh",
"command-working-directory": "/path-to-where-shell-script-should-be-executed/folder",
"pass-arguments-to-command":
[
{
"source": "payload",
"name": "head_commit.id"
},
{
"source": "payload",
"name": "myname"
},
{
"source": "payload",
"name": "my email"
}
],
"trigger-rule":
{
"match":
{
"type": "ip-whitelist",
"ip-range": "104.192.143.0/24"
}
}
}
]