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

Auto-configuration of branch/PR analysis on Cirrus CI

    XMLWordPrintable

    Details

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

      Description

      The scanner parameters specific to branches and pull requests, respectively prefixed by sonar.branch. and sonar.pullrequest., can be deduced from environment variables on Cirrus CI.

      When analyzing the branch marked as default at GitHub, then the parameter sonar.branch.name must not be set. The env variable CIRRUS_DEFAULT_BRANCH is used to know what is the default branch.

      The auto-configuration is enabled if the environment variable CIRRUS_CI is set to true. It is disabled if at least one branch/PR parameter is overridden on command-line.

      The Cirrus environment variables are documented at https://cirrus-ci.org/guide/writing-tasks/#environment-variables.

      Scanner logs contain:

      Detected Cirrus CI
      Auto-configure analysis of branch feature/foo
      

      or

      Detected Cirrus CI
      Auto-configure analysis of pull request #123
      

      The auto-configuration mechanism can be disabled by setting the scanner property sonar.branch.autoconfig.disabled to true. It's convenient for example when running integration tests on Cirrus.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              simon.brandhof Simon Brandhof (Inactive)
              Reporter:
              simon.brandhof Simon Brandhof (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: