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

Can't override Long-lived branch property regex from the scanner side when project-specific regex is set on server side

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 7.1
    • Component/s: Scanner
    • Labels:

      Description

      Problem description:

      • As long as a project uses the globally defined long lived branch regex, overriding this from the scanner command line works
      • As soon as the project has a project specific long lived branch regex, this cannot be overriden from the scanner command line, the project specific regex always apply.

      Reproducer:

      • Take a project with no project specific long lived branch regexp (the global setting applies)
      • Scan a new branch of this project as long lived by passing a specific regex
        sonar-scanner -Dsonar.branch.longLivedBranches.regex=my-foo-branch -Dsonar.branch.name=my-foo-branch ...
        

        The branch we be properly defined as long lived

      • In the UI or through the APIs, set a specific long lived branch regex for the project (eg bar-.*)
      • Scan a new branch of this project as long lived by passing a specific regex
        sonar-scanner -Dsonar.branch.longLivedBranches.regex=my-long-branch.* -Dsonar.branch.name=my-long-branch ...
        

        The branch will be considered as short lived because the bar-.* will apply even though it should be overriden by my-long-branch.*

        Attachments

          Activity

            People

            • Assignee:
              duarte.meneses Duarte Meneses
              Reporter:
              olivier.korach Olivier Korach
            • Votes:
              2 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Due:
                Created:
                Updated:
                Resolved: