-
-
Notifications
You must be signed in to change notification settings - Fork 168
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support BitBucket server's new webhook #436
Comments
FYI, I was able to get Bitbucket's webhook working by adding a line in /usr/local/bin/webhook to check
|
Thanks @ChetHosey, Is that for BitBucket cloud or server? Thanks, |
This was tested with Bitbucket server, v5.7.1. Unfortunately I've found that puppet-r10k manages the content of /usr/local/bin/webhook, so a local fix like this is likely to be overwritten. |
Thanks for that, I'll just patch the module until an official patch comes out! Do you know if the same fix might work against BitBucket cloud, or are the hooks completely different? Regards, |
Sorry, i'm not sure. If you test the webhook using cloud and find out it didn't work, please share a copy of the request body (Bitbucket should let you see the request / response from the last call to a webhook) and I can suggest a manual edit that should work. |
Hi @ChetHosey , Unfortunately I'm unable to test if this works or not with the r10k webhook as I'm using that on a client site that is using BB Server. On my own infrastructure, I'm currently using Jenkins to handle the hooks (which is working fine), but I'd much rather move to a "native" approach. Looking at the content of a request, it's apparent that the following line will work!
Many thanks for your time! For reference, here's the content of the BitBucket cloud hook.
|
Unfortunately the BitBucket Cloud built-in hook content is different from BitBucket Server's build in hook. The payload definition is published here: https://confluence.atlassian.com/bitbucketserver/event-payload-938025882.html#Eventpayload-Push This is a sample payload I got tried it out on a test deployment.
BitBucket Server payloads differentiate events based on the
I've tested this with and now our BitBucket server successfully triggers the appropriate environment deployment. It would be great to include this in to the module than having to use a modified version of the module as it works perfectly so far :) |
Hi there,
The BitBucket hook supported by this module is now a paid plugin (https://marketplace.atlassian.com/plugins/com.ngs.stash.externalhooks.external-hooks/server/overview). Since mid 2015, BitBucket Server has had its own implementation of webhooks (https://blog.bitbucket.org/2015/06/24/the-new-bitbucket-webhooks/).
I tried pointing our BitBucket at this module's webhook service and got some interesting errors. It appears that the new protocol is a bit chattier than the one this plugin currently supports. Any chance of having the new webhooks supported?
Also, I haven't tried it yet, but does this module support the BitBucket cloud webhooks (which appear to be implemented differently to the server webhooks)?
Many thanks,
Nick George
The text was updated successfully, but these errors were encountered: