Jenkins with Git - Merge another branch *into* the current branch before build
<p>I have a jenkins CI setup where development work is done in feature branches and when a pull request is made against the <code>master</code> branch, Jenkins runs a build against that pull request to confirm that all tests are passing. This is then synced back to our repo so that the person reviewing the pull request knows that the tests aren't goofed.</p>

<p>I would like to update this setup so that before Jenkins builds the branch from the pull request, it merges <code>master</code> <strong>into</strong> the pull request branch and builds the result. This merge should not be pushed back because it is still pending review, but this will ensure that tests are running against what the actual post-pull-request result will be.</p>

<p>I have found info on and tried the <code>Merge before build</code> action but this appears to merge the pull request branch into <code>master</code>, then if that succeeds, check the pull request branch back out and build. This is great for catching future merge conficts, but still does not catch the pull request branch up to <code>master</code> before building. </p>

<p>In the documentation for the Git Plugin (<a href="https://wiki.jenkins-ci.org/display/JENKINS/Git+Plugin" rel="noreferrer">https://wiki.jenkins-ci.org/display/JENKINS/Git+Plugin</a>) it mentions a feature that appears to do exactly what I want: "Next, pick a particular branch name as the integration target in the 'Advanced' section - (e.g. 'master', or 'stable'), and select 'Merge before build'", but this option is not available to me in Jenkins. I have the latest plugin so I am not sure if they removed this and didn't update their docs or what.</p>

<p>Does anyone know how to achieve the "merge another branch into my current branch and build the result" action? </p>

<p>Thanks!</p>