Uploaded image for project: 'SonarQube'
  1. SonarQube
  2. SONAR-12514

Allow multiple Bitbucket instances for pull request decoration

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 8.1
    • Component/s: Branch & PR, Settings
    • Labels:
      None
    • Edition:
      Enterprise
    • Production Notes:
      None

      Description

      Description

      In Enterprise Edition, It should be possible to configure multiple Bitbucket servers for pull request decoration.

      At global level, here are the settings for each Bitbucket instance :

      • Identifier of the instance
      • Bitbucket server URL
      • Personal access token

      At project level, here are the additional settings to be associate to the selected instance :

      • Repository identifier
      • Repository slug

      Web services

      Global-level web services

      • api/alm_settings/list_instances : Return list of ALM instances
        • Require 'Administer System' permission
        • No parameter
        • Response example :
          {
            "bitbucket": [
              {
                "key": "Bitbucket Server - Dev Team",
                "url": "https://bitbucket.enterprise.com",
                "personalAccessToken": "12345"
              }
            ]
          }
          
      • api/alm_settings/create_bitbucket
        • Require 'Administer System' permission
        • Mandatory parameters :
          • key, url, personalAccessToken
      • api/alm_settings/update_bitbucket
        • Require 'Administer System' permission
        • Mandatory parameters :
          • key, url, personalAccessToken
      • api/alm_settings/delete
        • Require 'Administer System' permission
        • Mandatory parameter : key
      • api/alm_settings/count_binding : Count number of projects bound to an instance, it will mainly be used when deleting a alm instance, in order to warn user about the impact
        • Require 'Administer System' permission
        • Mandatory parameter : instance

      Project-level web services

      • api/alm_settings/list : list of alm settings with only identifiers
        • Require 'Administer' permission on project
        • Mandatory parameters : project
        • Response example :
          {
            "almSettings" : [
                {
                  "alm": "bitbucket",
                  "key": "Bitbucket Server - Dev Team",
                  "url": "https://bitbucket.enterprise.com"
                }
          ]
          
      • api/alm_settings/get_binding
        • Require 'Administer' permission on project
        • Mandatory parameters : project
        • Response example :
            {
              "alm": "bitbucket",
              "key": "Bitbucket Server - Dev Team",
              "url": "https://bitbucket.enterprise.com",
              "repository": "team/project",
              "slug": "12345"
            }
          
      • api/alm_settings/set_bitbucket_binding
        • Require 'Administer' permission on the project
        • Mandatory parameters :
          • instance, project, repository, slug
      • api/alm_settings/delete_binding
        • Require 'Administer' permission on the project
        • Mandatory parameters : instance, project

      Database

      The following settings will be dropped :

      • sonar.pullrequest.bitbucketserver.serverUrl
      • sonar.pullrequest.bitbucketserver.token.secured
      • sonar.pullrequest.bitbucketserver.project
      • sonar.pullrequest.bitbucketserver.repository

      Existing values should be migrated to new db structure.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              wouter.admiraal Wouter Admiraal
              Reporter:
              julien.lancelot Julien Lancelot
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Due:
                Created:
                Updated:
                Resolved: