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

Bitbucket Server Integration plugin sends wrong ref to build status

XMLWordPrintable

      When sending build status to BitBucket, pull request ref name is send instead of an actual source branch ref name. In effect, BB doesn't show Jenkins builds, no matter the status.
       

      Expected result: plugin should input an actual source branch name, for example: refs/heads/feature/JIRA-1234_new_feature. Value null would also be acceptable, considering Bitbucket PR view also lists such build statuses (that's how it worked on 4.0.0 plugin version).
       

      Actual result: plugin inserts ref for pull requests, for example: refs/heads/PR-123. BB updates previous build statuses which removes all past statuses from the list.
       

      Workaround: update values in Bitbucket database, setting correct ref or removing it:

      -- postgresql example
      update bb_build_status set ref=null where where ref like 'refs/heads/PR-%'; 

      The problem is, it will be set again during the next job launch, so plugin downgrade is needed in addition to above. Optionally, some job, running above SQL. Although, such approach is not recommended by Atlassian.

      Not sure if this is problem with our Bitbucket version? (8.19.6) Even if, the plugin should probably take into account older BB versions.

            Unassigned Unassigned
            rzabcio Jakub Glazik
            Votes:
            1 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated: