You're on your way to the next level! Join the Kudos program to earn points and save your progress.
Level 1: Seed
25 / 150 points
Next: Root
1 badge earned
Challenges come and go, but your rewards stay with you. Do more to earn more!
What goes around comes around! Share the love by gifting kudos to your peers.
Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!
Join now to unlock these features and more
I am using Jenkins and bitbucket integrations. I want to trigger a build when a PR is created. I created a webhook on bitbucket its returning 200 response but no build is getting triggered. I have enabled "Build when a change is pushed to BitBucket" option in the build configuration.
You have to ensure that your Webhook (Settings->Webhooks) is pointing to your Jenkins bitbucket-hook like the following: "https://ci.yourorg.com/bitbucket-hook/". Notice that last "/", without it, the build will not be triggered.
After some struggling with the BitBucket plugin, I have managed to get it working. Below is the summary of things I found are necessary for builds to be triggered, but are not obvious from plugin's documentation:
Make sure your webhook has repository push trigger enabled. I thought pull request created / updated would suffice (building on PR is what I wanted) but the plugin reacts only to push.
Set your repository URL (in Git plugin) to https://bitbucket.org/REPOSITORY_OWNER/REPOSITORY_NAME. Plugin will not match it if it's the SSH url.
You do need the SCM polling enabled. The plugin itself does not pull the changes. You can leave the schedule field empty, so repository is polled only when the plugin triggers it.
I hope this helps. If the build is still not triggered for you, try enabling logs for the following classes:
com.cloudbees.jenkins.plugins.BitbucketHookReceiver
com.cloudbees.jenkins.plugins.BitBucketTrigger
com.cloudbees.jenkins.plugins.BitbucketJobProbe
com.cloudbees.jenkins.plugins.BitbucketPayloadProcessor
com.cloudbees.jenkins.plugins.bitbucket.BitbucketSCMSource
Recommended Learning For You
Level up your skills with Atlassian learning
Jira Align Program Essentials
Learn how to use Jira Align at the program level and how to plan for and manage your Program Increment (PI).
Managing Agile Boards and Reports
Learn how to pick the right board type for your team and customize it to fit your specific requirements.
Atlassian Certified Associate
Jira Software Board Configuration
Earn an associate-level credential from Atlassian that shows you can effectively configure Jira Software boards.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.