Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-75209

Multibranch pipeline uses Jenkinsfile from master branch

    • Icon: Bug Bug
    • Resolution: Won't Fix
    • Icon: Major Major
    • None
    • Bitbucket Server v7.21.23
      Bitbucket Branch Source 934.4.0

      I have a multibranch pipeline project configured to use the Bitbucket Branch Source plugin for SCM.  We have a webhook from Bitbucket server to the Jenkins instance whenever a pull request is opened.  The Jenkins instance receives that webhook and runs my Multibranch pipeline for that branch.  The problem is that the Multibranch pipeline project is using the Jenkinsfile from the master branch (pre-merge), whereas I would want it to use the post-merge version of that Jenkinsfile.

          [JENKINS-75209] Multibranch pipeline uses Jenkinsfile from master branch

          Nikolas Falco added a comment -

          Since which version this issue happens?

          Nikolas Falco added a comment - Since which version this issue happens?

          Corey Olson added a comment -

          Great question.  I don't have an answer though.  I can probably test a few versions back and see if the problem is still there, but there's probably a limit to how far I can roll back.

          Corey Olson added a comment - Great question.  I don't have an answer though.  I can probably test a few versions back and see if the problem is still there, but there's probably a limit to how far I can roll back.

          Corey Olson added a comment -

          I can only test back to 933.2.0, and that one also showed this problem

          Corey Olson added a comment - I can only test back to 933.2.0, and that one also showed this problem

          Nikolas Falco added a comment - - edited

          The user documentation HERE (first two chapter) warning about the lightweight is no more supported since bitbucket server 7.x. This means that is not possible have Jenkinsfile that result from merge commit. At least not when the SCM api is requesting the Jenkinsfile to setup the job when a build start.
          I had asked to understand if there was a working version but you confirmed that never worked for this scenario.

          EDIT: Check if settings are ok as described at https://github.com/jenkinsci/bitbucket-branch-source-plugin/blob/master/docs/USER_GUIDE.adoc#bitbucket-server-7-compatibility

          Nikolas Falco added a comment - - edited The user documentation HERE (first two chapter) warning about the lightweight is no more supported since bitbucket server 7.x. This means that is not possible have Jenkinsfile that result from merge commit. At least not when the SCM api is requesting the Jenkinsfile to setup the job when a build start. I had asked to understand if there was a working version but you confirmed that never worked for this scenario. EDIT: Check if settings are ok as described at https://github.com/jenkinsci/bitbucket-branch-source-plugin/blob/master/docs/USER_GUIDE.adoc#bitbucket-server-7-compatibility

          Corey Olson added a comment -

          Thank you for clarifying

          Corey Olson added a comment - Thank you for clarifying

            nfalco Nikolas Falco
            coolson Corey Olson
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: