dashcheulov / r10k-webhook

GNU General Public License v3.0
2 stars 1 forks source link

bitbucket support #1

Open leshiynyc opened 5 years ago

leshiynyc commented 5 years ago

Does your tool work when the code is stored on Bitbucket/Github where you can't install the client ?

Park0 commented 5 years ago

Yes u can!

curl -X POST -H "Content-Type: application/json"  -d '{"ref":"testing"}'  localhost:8088/api

would trigger the update of the testing branch assuming r10k-webhook runs on localhost default port and the testing branch exists this should work Not sure if bitbucket can do this but i hope it can do this as a webhook

dashcheulov commented 4 years ago

It works on Gitlab. You have to add url of your r10k-webhook to Repository settings -> Integrations. Unfortunately, payload of GitHub and Bitbucket doesn't contain "ref" https://developer.github.com/webhooks/#payloads https://confluence.atlassian.com/bitbucket/event-payloads-740262817.html#EventPayloads-Push I might make key name configurable containing branch name (now it's hardcoded as "ref"), but you would have to know this key name from particular payload (see links above).