Auto webhook creation broken for Bitbucket 6.x and earlier
See original GitHub issueNote from project maintainer
This issue still exists for Bitbucket v5.x. Fixing that is tracked in #352. This has been fixed for Bitbucket v6.x in v2.9.1 of the plugin. To enable the fix, you must go to your Bitbucket Endpoint Configuration and set the “Server Version” to “Bitbucket 6.x (and earlier)”.
The credentials being used must also have sufficient permissions to create hooks on the the Bitbucket project.
Description
Jenkins version - 2.22.1 Plugin version - 2.8.0 Bitbucket server and version - 5.4.1
When I perform a ‘Scan Organization Folder Now’, I expect webhooks to be registered for my repos but this does not occur and instead I see 400 errors in the logs.
Could not register hooks for sandbox/wordpress-app
com.cloudbees.jenkins.plugins.bitbucket.api.BitbucketRequestException: HTTP request error. Status: 400: .
HttpResponseProxy{HTTP/1.1 400 [X-AREQUESTID: *16U2BIYx857x12710733x0, X-ASEN: SEN-6051868, X-AUSERID: 9658, X-AUSERNAME: username, Cache-Control: no-cache, no-transform, Vary: X-AUSERNAME,Accept-Encoding, Transfer-Encoding: chunked, X-Content-Type-Options: nosniff, Content-Type: application/json;charset=UTF-8, Date: Fri, 10 Jul 2020 18:17:06 GMT, Connection: close] org.apache.http.client.entity.DecompressingEntity@325b29b7}
at com.cloudbees.jenkins.plugins.bitbucket.server.client.BitbucketServerAPIClient.doRequest(BitbucketServerAPIClient.java:1049)
at com.cloudbees.jenkins.plugins.bitbucket.server.client.BitbucketServerAPIClient.postRequest(BitbucketServerAPIClient.java:1002)
at com.cloudbees.jenkins.plugins.bitbucket.server.client.BitbucketServerAPIClient.postRequest(BitbucketServerAPIClient.java:990)
at com.cloudbees.jenkins.plugins.bitbucket.server.client.BitbucketServerAPIClient.registerCommitWebHook(BitbucketServerAPIClient.java:600)
at com.cloudbees.jenkins.plugins.bitbucket.hooks.WebhookAutoRegisterListener.registerHook(WebhookAutoRegisterListener.java:177)
at com.cloudbees.jenkins.plugins.bitbucket.hooks.WebhookAutoRegisterListener.registerHooks(WebhookAutoRegisterListener.java:133)
at com.cloudbees.jenkins.plugins.bitbucket.hooks.WebhookAutoRegisterListener.access$000(WebhookAutoRegisterListener.java:56)
at com.cloudbees.jenkins.plugins.bitbucket.hooks.WebhookAutoRegisterListener$1.doRun(WebhookAutoRegisterListener.java:102)
at hudson.triggers.SafeTimerTask.run(SafeTimerTask.java:91)
at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at java.base/java.lang.Thread.run(Thread.java:834)
Issue Analytics
- State:
- Created 3 years ago
- Comments:51 (26 by maintainers)
Top Results From Across the Web
Create and trigger a webhook tutorial | Bitbucket Cloud
Learn how to create a trigger and a webhook in Bitbucket Cloud. ... Start by creating a new file with the following text:...
Read more >Webhooks from Bitbucket has stopped working
I've tried to disconnect/recreate the connection but they aren't added back and there are no warnings in Azure DevOps that they are missing....
Read more >BitBucket Jenkins doesn't automatically build - Stack Overflow
Using Jenkins 2.53 and Bitbucket plugin 1.1.5, I had to manually trigger the build first to get the webhook to work.
Read more >Bitbucket Webhooks Troubleshooting
This endpoint is used by the add-on Webhook to Jenkins for Bitbucket in ... The Bitbucket Plugin functionality was broken prior to version...
Read more >Bitbucket hooks don't work for Pipeline jobs - Jenkins Jira
I've created a Jenkins Pipeline and now I want to run it automatically once Bitbucket ... Same problem "normal" Jobs are triggered by...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@ssc327 thank you for help.
I’ve tried different combinations last week, before plugin update, but not all today. The permissions setting didn’t help last week so I forgot to check this after updating a plugins. Now I’ve done new tests using Bitbucket Branch Source Plugin 2.9.1
@marx-freedom does the account that you are using have permission to make webhooks on the BB project?