From: MikeBirnstiehl Date: Tue, 9 Mar 2021 23:37:03 +0000 (-0600) Subject: Update note on keeping main branch history X-Git-Tag: 8.8.0.42792~36 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=e34f7a9bb6f1799e42c33c8f34c5e1e823e96884;p=sonarqube.git Update note on keeping main branch history --- diff --git a/server/sonar-docs/src/pages/analysis/azuredevops-integration.md b/server/sonar-docs/src/pages/analysis/azuredevops-integration.md index 51a8c3c52f6..0a58c6ed607 100644 --- a/server/sonar-docs/src/pages/analysis/azuredevops-integration.md +++ b/server/sonar-docs/src/pages/analysis/azuredevops-integration.md @@ -311,9 +311,6 @@ To add pull request decoration to a manually created or existing project, make s - **Project name** - **Repository name** -[[info]] -| If you add your project manually, your main branch defaults to the name "master". You can rename it from the project settings at **Administration > Branches and Pull Requests**. - ### Advanced pull request decoration configuration [[collapse]] diff --git a/server/sonar-docs/src/pages/analysis/bitbucket-integration.md b/server/sonar-docs/src/pages/analysis/bitbucket-integration.md index 1f20eb32235..f2fa4be6317 100644 --- a/server/sonar-docs/src/pages/analysis/bitbucket-integration.md +++ b/server/sonar-docs/src/pages/analysis/bitbucket-integration.md @@ -54,9 +54,6 @@ To add pull request decoration to a manually created or existing project, make s - **Project Key** – the project key is part of your BitBucket Server repository URL (.../projects/**{KEY}**/repos/{SLUG}/browse). - **Repository SLUG** – The repository slug is part of your BitBucket Server repository URL (.../projects/{KEY}/repos/**{SLUG}**/browse). -[[info]] -| If you add your project manually, your main branch defaults to the name "master". You can rename it from the project settings at **Administration > Branches and Pull Requests**. - ### Advanced pull request decoration configuration [[collapse]] diff --git a/server/sonar-docs/src/pages/analysis/branch-pr-analysis-overview.md b/server/sonar-docs/src/pages/analysis/branch-pr-analysis-overview.md index 8335bf63c5f..942d4416b01 100644 --- a/server/sonar-docs/src/pages/analysis/branch-pr-analysis-overview.md +++ b/server/sonar-docs/src/pages/analysis/branch-pr-analysis-overview.md @@ -10,16 +10,6 @@ SonarScanners running in GitLab CI/CD, Azure Pipelines, Cirrus CI, and Jenkins w [[warning]] | Automatic configuration is disabled if any branch or pull request properties have been set manually. -## Keeping your "master" branch history when upgrading from Community Edition to a commercial edition - -In Community Edition, your analyzed branch is named "master" by default. - -When upgrading to a current commercial edition version, automatic branch and pull request configuration creates branches based on their names in your code repository. If the name of your Main Branch (master) in SonarQube doesn't match the branch's name in your code repository, the history of your Main Branch won't be taken on by the branch you analyze. - -**Before running analysis**, you can keep your branch history by renaming the Main Branch in SonarQube with the name of the branch in your code repository at **Project Settings > Branches and Pull Requests**. - -For example, if your Main Branch is named "master" in SonarQube but "develop" in your code repository, rename your Main Branch "develop" in SonarQube. - ## GitLab CI/CD For GitLab CI/CD configuration, see the [GitLab ALM integration](/analysis/gitlab-integration/) page. @@ -30,4 +20,4 @@ For Azure Pipelines configuration, see the [Azure DevOps integration](/analysis/ For Bitbucket Pipelines configuration, see the [Bitbucket Cloud integration](/analysis/bitbucket-cloud-integration/) page. ## Jenkins -For Jenkins configuration, see [Jenkins](/analysis/jenkins/). \ No newline at end of file +For Jenkins configuration, see [Jenkins](/analysis/jenkins/). diff --git a/server/sonar-docs/src/pages/analysis/github-integration.md b/server/sonar-docs/src/pages/analysis/github-integration.md index 0bc200266c3..fd1d78d89f1 100644 --- a/server/sonar-docs/src/pages/analysis/github-integration.md +++ b/server/sonar-docs/src/pages/analysis/github-integration.md @@ -87,9 +87,6 @@ To add pull request decoration to a manually created or existing project, after - **Configuration name** – The configuration name that corresponds to your GitHub instance. - **Repository identifier** – The path of your repository URL. -[[info]] -| If you add your project manually, your main branch defaults to the name "master". You can rename it from the project settings at **Administration > Branches and Pull Requests**. - ### Advanced pull request decoration configuration [[collapse]] diff --git a/server/sonar-docs/src/pages/analysis/gitlab-integration.md b/server/sonar-docs/src/pages/analysis/gitlab-integration.md index c3f6634f8d5..af591fbc736 100644 --- a/server/sonar-docs/src/pages/analysis/gitlab-integration.md +++ b/server/sonar-docs/src/pages/analysis/gitlab-integration.md @@ -201,9 +201,6 @@ To add merge request decoration to a manually created or existing project, make - **Configuration name** – The configuration name that corresponds to your GitLab instance. - **Project ID** – your GitLab Project ID found in GitLab -[[info]] -| If you add your project manually, your main branch defaults to the name "master". You can rename it from the project settings at **Administration > Branches and Pull Requests**. - ### Advanced merge request decoration configuration [[collapse]] diff --git a/server/sonar-docs/src/pages/branches/overview.md b/server/sonar-docs/src/pages/branches/overview.md index efcaa71fb84..1e8c9e221d2 100644 --- a/server/sonar-docs/src/pages/branches/overview.md +++ b/server/sonar-docs/src/pages/branches/overview.md @@ -13,9 +13,11 @@ With Branch Analysis, you can ensure that you're maintaining consistent code qua This is the default branch and typically corresponds to what's being developed for your next release. This branch is usually known within a development team as "master" or "head" and is analyzed when no specific branch parameters are provided. SonarQube labels this branch as **Main Branch**, and, with Community Edition, this is the only branch you can analyze. -If you add your project from an ALM, your main branch name in SonarQube matches your main branch name in your repository. See **ALM Integrations** in the documentation navigation for more information on adding your project from an ALM. +Adding projects by ALM copies the main branch name in SonarQube from the main branch name in your repository. See **ALM Integrations** in the documentation navigation for more information on adding your project from an ALM. -If you add your project manually, your main branch defaults to the name "master" but can be renamed from the project settings at **Administration > Branches and Pull Requests**. +If you add your project manually, your main branch defaults to the name "master". + +Starting in [Developer Edition](https://redirect.sonarsource.com/editions/developer.html), your main branch can be renamed from the project settings at **Project Settings > Branches and Pull Requests**. ### Settings and Quality Profiles on Branches @@ -82,3 +84,15 @@ For example, adding the pattern `release/.*` would keep any branches named relea You can set a branch to **Keep when inactive** at the project level from from the **Branches** tab at **Project Settings > Branches and Pull Requests**. Here, you can also turn off protection for a branch so it will be deleted when it's inactive for the number of days that has been specified in the global settings at **Administration > General Settings > Housekeeping > Number of days before deleting inactive branches**. **Note:** The main branch is always protected from automatic deletion, even if it's inactive. This can't be changed. + +## Keeping your "master" branch history when upgrading from Community Edition to a commercial edition +[[info]] +| If you added a SonarQube project from an ALM instead of manually, the name of the main branch in SonarQube is copied from the name of the main branch in your repository, and you shouldn't have any branch history issues when upgrading to a commercial edition. + +In Community Edition, if you create a project manually, your analyzed branch is named "master" by default. + +When upgrading to a current commercial edition version, automatic branch and pull request configuration creates branches based on their names in your code repository. If the name of your Main Branch (master) in SonarQube doesn't match the branch's name in your code repository, the history of your Main Branch won't be taken on by the branch you analyze. + +**Before running analysis**, you can keep your branch history by renaming the Main Branch in SonarQube with the name of the branch in your code repository at **Project Settings > Branches and Pull Requests**. + +For example, if your Main Branch is named "master" in SonarQube but "develop" in your code repository, rename your Main Branch "develop" in SonarQube.