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

Bitbucket Server Integration webhook marks branches as deleted in a multibranch project that is not using this plugin

XMLWordPrintable

    •  2.1.1

      I set up two multibranch projects in the same Jenkins instance. Both of them refer to the same repository in Bitbucket Server, but one of them is using Bitbucket Branch Source Plugin and the other is using Bitbucket Server Integration. Each of them has its own webhook in Bitbucket Server. The "Bitbucket Server trigger scan after push" option is checked only in the multibranch project that uses Bitbucket Server Integration.

      Now when I push commits to the repository, the webhooks correctly trigger a build in each multibranch project. However, the build using Bitbucket Branch Source Plugin fails: the multibranch project somehow believes that the branch has been deleted, so it does not clone the repository at all. If I click "Scan Multibranch Pipeline Now", then Jenkins realizes that the branch exists, and immediately builds it; but the next push will again mark the branch as deleted.

      If I disable the webhook that has been set by Bitbucket Server Integration, and push again, then Jenkins understands that the branch exists, and further pushes do not change that. Therefore, it seems that the webhook handler in Bitbucket Server Integration is messing up the branch in the multibranch project that is using Bitbucket Branch Source Plugin.

            Unassigned Unassigned
            kon Kalle Niemitalo
            Votes:
            5 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: