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

Multibranch project: reindexing not triggered by Bitbucket webhook

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Minor Minor
    • None
    • Bitbucket Branch Source Plugin v. 2.4.4
      Jenkins v. 2.164.2
      Atlassian Bitbucket v. 5.14.4

      I have created a multibranch pipeline project and configured a webhook (for pushed changes) in my Bitbucket Native Server as follows:

      https://<JENKINS_URL>/bitbucket-scmsource-hook/notify?server_url=<BITBUCKET_SERVER_URL> 
      

      However, the webhook does not trigger the reindexing of my multibranch project. I have checked the POST message and I have seen that the payload always provides a change like this one:

      "changes":[ 
         { 
          "ref":{ 
            "id":"refs/heads/my_test",
            "displayId":"my_test",
            "type":"BRANCH"
          },
          "refId":"refs/heads/my_test",
          "fromHash":"8e1e85228a6a76d6f127772037b921ce97b86434",
          "toHash":"b3696c9321f5a2e478aa9a60e61a7baa43ac9964",
          "type":"ADD"
        }
      ]
      

      If I manually send the POST request and leave changes empty, then the reindexing is triggered properly:

      "changes":[]
      

      Am I doing something wrong with the configuration of the webhook or is this a bug?

      Many thanks for help and clarification.

          [JENKINS-58046] Multibranch project: reindexing not triggered by Bitbucket webhook

          GPX Ricky created issue -
          GPX Ricky made changes -
          Description Original: I have created a multibranch pipeline project and configured a webhook (for pushed changes) in my Bitbucket Native Server as follows:
          {code:java}
          https://&lt;JENKINS_URL&gt;/bitbucket-scmsource-hook/notify?server_url=&lt;BITBUCKET_SERVER_URL>
          {code}
          However, the webhook does not trigger the reindexing of my multibranch project. I have checked the POST message and I have seen that the payload always provides a change like this one:
          {code:java}
          "changes":[
             {
              "ref":{
                "id":"refs/heads/my_test",
                "displayId":"my_test",
                "type":"BRANCH"
              },
              "refId":"refs/heads/my_test",
              "fromHash":"8e1e85228a6a76d6f127772037b921ce97b86434",
              "toHash":"b3696c9321f5a2e478aa9a60e61a7baa43ac9964",
              "type":"ADD"
            }
          ]
          {code}
          If I manually send the POST request and remove this change then the reindexing is triggered properly.

          Am I doing something wrong with the configuration of the webhook or is this a bug?

          Many thanks for help and clarification.
          New: I have created a multibranch pipeline project and configured a webhook (for pushed changes) in my Bitbucket Native Server as follows:
          {code:java}
          https://&lt;JENKINS_URL&gt;/bitbucket-scmsource-hook/notify?server_url=&lt;BITBUCKET_SERVER_URL>
          {code}
          However, the webhook does not trigger the reindexing of my multibranch project. I have checked the POST message and I have seen that the payload always provides a change like this one:
          {code:java}
          "changes":[
             {
              "ref":{
                "id":"refs/heads/my_test",
                "displayId":"my_test",
                "type":"BRANCH"
              },
              "refId":"refs/heads/my_test",
              "fromHash":"8e1e85228a6a76d6f127772037b921ce97b86434",
              "toHash":"b3696c9321f5a2e478aa9a60e61a7baa43ac9964",
              "type":"ADD"
            }
          ]
          {code}
          If I manually send the POST request and leave {{changes}} empty, then the reindexing is triggered properly:

          {code}
          "changes":[]
          {code}

          Am I doing something wrong with the configuration of the webhook or is this a bug?

          Many thanks for help and clarification.

            Unassigned Unassigned
            gpxricky GPX Ricky
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: