Reputation: 16126
I want to trigger a job in Jenkins whenever a pull request is created in Bitbucket. I have used Bitbucket Pull Request Builder for this and set up the refspec and branch specifier as follow:
+refs/pull/*/head:refs/remotes/origin/pr/*
pr/*/from
But Jenkins job is picking the last merged branch not the source branch of the open pull request.
Please help me with this or provide me with a clean solution to create a pipeline to trigger a job whenever a pull request is created in Jenkins
Upvotes: 1
Views: 1985
Reputation: 59896
I would prefer Generic+Webhook+Trigger+Plugin instead of BitBucket it provides everything in the payload when pull request created.
Here are the steps
Create Webhook in Bitbucket
You can check details integration here
Upvotes: 1