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

Bitbucket Server Integration plugin does send correct Source Branch to build status API

      I am using the "Bitbucket Server Integration" plugin, with a multibranch pipeline, and I have it set to build automatically all pull requests.

      We are not using https://plugins.jenkins.io/bitbucket-push-and-pull-request/ or https://plugins.jenkins.io/bitbucket-build-status-notifier/

      Only https://plugins.jenkins.io/atlassian-bitbucket-server-integration/

      The plugin is reporting the build status (e.g. INPROGRESS or FAILED) to the Bitbucket api for the destination branch (e.g. develop) and for the pull request branch (e.g. PR-1234), but NOT for the source branch of the pull request (e.g. feature/some-branch).

      This results in the build status showing up on the Bitbucket Web UI only in certain places, and not all of the expected locations (outlined in red in attached screenshots).
      Notably, builds using the same job and jenkinsfile which are not Pull Request builds do show up correctly on the list of all pull requests in the Bitbucket UI. So, this issue only affects pull requests.

          [JENKINS-72350] Bitbucket Server Integration plugin does send correct Source Branch to build status API

          Kristy Hughes added a comment -

          Hi bernsteina,

          Can you please elaborate a bit more on your usage of the Basic Branch Build Strategies plugin? Specifically the regular expression you're using for the PRs. The resolution in the screenshots isn't quite high enough for me to read exactly what that regular expression is. Would you please be able to provide that as text? Can you also please provide me with an example branch name you're using?

          I have verified that the build status does appear on the pull request list page when just using the Atlassian Bitbucket Server Integration Plugin (without using any 'Named branches' from the Basic Branch Build Strategies plugin), so I suspect that the issue has something to do with the interaction between these two plugins.

          Regards,
          Kristy

          Kristy Hughes added a comment - Hi bernsteina , Can you please elaborate a bit more on your usage of the Basic Branch Build Strategies plugin? Specifically the regular expression you're using for the PRs. The resolution in the screenshots isn't quite high enough for me to read exactly what that regular expression is. Would you please be able to provide that as text? Can you also please provide me with an example branch name you're using? I have verified that the build status does appear on the pull request list page when just using the Atlassian Bitbucket Server Integration Plugin (without using any 'Named branches' from the Basic Branch Build Strategies plugin), so I suspect that the issue has something to do with the interaction between these two plugins. Regards, Kristy

          Aaron added a comment - - edited

          khughes sorry for the delayed response. The regular expression we are using for "Named branches" is ^PR-\d+$

          The reason we are using this setup is because we were having reliability issues with the webhooks, and prefer to poll instead.

          Aaron added a comment - - edited khughes sorry for the delayed response. The regular expression we are using for "Named branches" is ^PR-\d+$ The reason we are using this setup is because we were having reliability issues with the webhooks, and prefer to poll instead.

            Unassigned Unassigned
            bernsteina Aaron
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: