title: Trigger Jenkins Job from Bitbucket on Pull Request
body: <p>Hoping to gather insight from professionals. My end goal is to trigger a jenkins build whenever a <strong>bitbucket</strong> pull request happens. If anyone could give me an ELI5(explain like I am 5) answer it would be greatly appreciated. Sorry if this is the wrong format, I am new to jenkins and stackoverflow.</p>
  
  <p><strong>What I have done so far:</strong></p>
  
  <ol>
  <li><p>Created webhook in bitbucket and gave the url to my jenkins job. example: <a href="http://jenkinsURL:8080/job/boulevard-dev/generic-webhook-trigger/invoke?token=myPull_Request_Token" rel="noreferrer">http://jenkinsURL:8080/job/boulevard-dev/generic-webhook-trigger/invoke?token=myPull_Request_Token</a></p></li>
  <li><p><a href="https://i.stack.imgur.com/2yxrL.png" rel="noreferrer">Pull request webhook trigger</a></p></li>
  <li><p>In Jenkins, under source code management I have: <a href="https://i.stack.imgur.com/mw6f6.png" rel="noreferrer">Source Code Management Settings</a>. This is currently fetching a ton of branches, failing, then building the master branch when the job starts?</p></li>
  <li><p>For build triggers, other stackoverflow articles have pointed me to the "Generic Webhook Trigger". <a href="https://github.com/jenkinsci/generic-webhook-trigger-plugin" rel="noreferrer">https://github.com/jenkinsci/generic-webhook-trigger-plugin</a></p></li>
  <li><p>I am not entirely sure how this generic webhook trigger should effectively be setup? Hoping someone has experience using it and could explain what is needed.</p></li>
  <li><p>This is what have seen referenced in other articles.<a href="https://i.stack.imgur.com/mAj8n.png" rel="noreferrer">Build Triggers settings </a> <a href="https://i.stack.imgur.com/aay68.png" rel="noreferrer">Build triggers settings 2</a> </p></li>
  </ol>
  
  <p><strong>Questions:</strong></p>
  
  <ul>
  <li>What does a correct setup / example of the generic webhook trigger look like?</li>
  <li>Currently, my job triggers when a change is made to master or merged to master, how can I specify to my job that I want the bitbucket pull request branch to be built? </li>
  <li>Also, I found this, not sure if its related to my issue or not? <a href="https://jira.atlassian.com/browse/BCLOUD-5814" rel="noreferrer">https://jira.atlassian.com/browse/BCLOUD-5814</a></li>
  </ul>