Uploaded image for project: 'Bamboo Data Center'
  1. Bamboo Data Center
  2. BAM-18273

Ability to bulk update Bitbucket Server/Stash repository URLs

XMLWordPrintable

    • 64
    • 15
    • Our product teams collect and evaluate feedback from a number of different sources. To learn more about how we use customer feedback in the planning process, check out our new feature policy.

      Problem Definition

      When migrating Bitbucket Server/Stash repositories to new servers, the repository URLs do not change for Branch Plans, even if the Application link is recreated and the Repository recreated.

      Suggested Solution

      • Add option to re-sync all repository SSH URLs via Bitbucket application link.
      • Add option to re-save (or re-create SSH keys) all existing Bitbucket repositories incase of SSH key issues.

      Workaround

      This can be done using a database update:

      1. Stop Bamboo
      2. Back up your Bamboo database for restore/recovery purposes
      3. Run the following update query, replacing <old-url> and <new-url> as needed:
        PostgresDb and MySQL:
        update VCS_LOCATION as V
           set xml_definition_data = replace(xml_definition_data,'<old-url>','<new-url>');

         
        MSSQL Server: 

        update  VCS_LOCATION  set XML_DEFINITION_DATA = replace( cast( XML_DEFINITION_DATA as nvarchar(max) ),'<old-url>','<new-url>'); 
        

         Note: If you are using a port other than 22, you will also need to amend the port number to the new URL or configure port forwarding from the default port (22) as explained in this KB article.

      4. Start Bamboo

              Unassigned Unassigned
              ezeidan Ellie Z (they/them)
              Votes:
              48 Vote for this issue
              Watchers:
              55 Start watching this issue

                Created:
                Updated: