I have a Jenkins job Trigger builds remotely (e.g., from scripts), and bitbucket PULL request HOOK triggers that job we can say everything works fine.

Jenkins is smart to check any change and build them.

On each build there is data that is changed and is sent in json format.

Is there a way to extract that data sent by hooks to Jenkins while using buld trigger already mentioned?

  • is this what you are looking for ? github.com/nishio-dens/bitbucket-pullrequest-builder-plugin – divyenduz Jan 20 '15 at 6:56
  • That plugin uses cron-like job to check for new PR. And I have settled for that plugin until I find something more usefull. Thing is that we used gerrit but had to move to BitBucket now some nice features are simply not possibile with BB. – titus Jan 20 '15 at 9:43

I'm not sure how to achieve your goal from BitBucket side, but for every job in Jenkins, there are metadata parameters which you can check by going to a link which looks like that:


Example: https://lel.doesntexist.com/job/geek-kb/job/scripts/job/declarative_pipeline_test/2/api/json


You can extract data into variables with the Generic Webhook Trigger Plugin.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.