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

Bitbucket Server Integration plugin sends wrong ref to build status

    • 4.1.2

      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.

          [JENKINS-74782] Bitbucket Server Integration plugin sends wrong ref to build status

          Jakub Glazik created issue -
          Jakub Glazik made changes -
          Description Original: 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: {{{color:#00875a}refs/heads/feature/JIRA-1234_new_feature{color}.}} 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: {color:#00875a}{{refs/heads/PR-123}}{color}. 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:
          {code:sql}
          -- postgresql example
          update bb_build_status set ref=null where where ref like '%PR-%'; {code}
          The problem is, it will be set again during the next job launch.


          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.
          New: 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: {{{color:#00875a}refs/heads/feature/JIRA-1234_new_feature{color}.}} 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: {color:#00875a}{{refs/heads/PR-123}}{color}. 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:
          {code:sql}
          -- postgresql example
          update bb_build_status set ref=null where where ref like 'refs/heads/PR-%'; {code}
          The problem is, it will be set again during the next job launch, do plugin downgrade is needed. 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.
          Jakub Glazik made changes -
          Description Original: 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: {{{color:#00875a}refs/heads/feature/JIRA-1234_new_feature{color}.}} 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: {color:#00875a}{{refs/heads/PR-123}}{color}. 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:
          {code:sql}
          -- postgresql example
          update bb_build_status set ref=null where where ref like 'refs/heads/PR-%'; {code}
          The problem is, it will be set again during the next job launch, do plugin downgrade is needed. 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.
          New: 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: {{{color:#00875a}refs/heads/feature/JIRA-1234_new_feature{color}.}} 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: {color:#00875a}{{refs/heads/PR-123}}{color}. 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:
          {code:sql}
          -- postgresql example
          update bb_build_status set ref=null where where ref like 'refs/heads/PR-%'; {code}
          The problem is, it will be set again during the next job launch, so plugin *downgrade is needed*. 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.
          Jakub Glazik made changes -
          Description Original: 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: {{{color:#00875a}refs/heads/feature/JIRA-1234_new_feature{color}.}} 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: {color:#00875a}{{refs/heads/PR-123}}{color}. 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:
          {code:sql}
          -- postgresql example
          update bb_build_status set ref=null where where ref like 'refs/heads/PR-%'; {code}
          The problem is, it will be set again during the next job launch, so plugin *downgrade is needed*. 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.
          New: 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: {{{color:#00875a}refs/heads/feature/JIRA-1234_new_feature{color}.}} 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: {color:#00875a}{{refs/heads/PR-123}}{color}. 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:
          {code:sql}
          -- postgresql example
          update bb_build_status set ref=null where where ref like 'refs/heads/PR-%'; {code}
          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.
          Martin Henschke made changes -
          Labels New: triaged
          Kalle Niemitalo made changes -
          Link New: This issue relates to JENKINS-75083 [ JENKINS-75083 ]
          Kalle Niemitalo made changes -
          Remote Link New: This issue links to "JENKINS-74782 fix build status ref · Pull Request #453 · jenkinsci/atlassian-bitbucket-server-integration-plugin (Web Link)" [ 30482 ]
          Daniel Kjellin made changes -
          Resolution New: Fixed [ 1 ]
          Status Original: Open [ 1 ] New: Fixed but Unreleased [ 10203 ]
          Daniel Kjellin made changes -
          Released As New: 4.1.2
          Status Original: Fixed but Unreleased [ 10203 ] New: Resolved [ 5 ]
          Daniel Kjellin made changes -
          Link New: This issue is duplicated by JENKINS-75071 [ JENKINS-75071 ]

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

              Created:
              Updated:
              Resolved: