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

Jenkins multibranch pipeline scan is triggered in case of remote pull request merge

XMLWordPrintable

      There is such logic in the bitbucket-branch-source plugin:

       
      if (push.getChanges().isEmpty()) {
          LOGGER.log(Level.INFO, "Received hook from Bitbucket. Processing push event on {0}/{1}",
          newObject[]{owner, repository});
          scmSourceReIndex(owner, repository);
      }
       
      And this works in case of remote pull request merges. (https://community.atlassian.com/t5/Questions/Pull-requests-Squashed-commits-Remote-Merges/qaq-p/171569)
       
      This leads to reindexing of a multibranch pipeline project which can take a lot of time.

       

      In my case I have a lot of pull requests(around 150) and build for one of them takes around an hour. These pull requests mostly targeted to the same branch. Because of this we rescan our Bitbucket multibranch pipeline only twice a week because it takes a lot of time to rebuild all of these PRs because the target branch has new changes. And if some pull request is merged remotely this leads to the reindexing which is unexpected. This locks me if this happens in the middle of the day.
       

            nfalco Nikolas Falco
            asavanchuk Alaiksei Savanchuk
            Votes:
            2 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: