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

Detect and fill properties when doing a scan on GitlabCI

    XMLWordPrintable

    Details

    • Type: Task
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 8.0
    • Component/s: Scanner
    • Labels:
      None
    • Edition:
      Community
    • Production Notes:
      None

      Description

      Branches

      Detect that the build is for a branch :

      sonar.branch.name=$CI_COMMIT_REF_NAME

      Merge requests

      Detect that the build is for a merge request : $CI_MERGE_REQUEST_ID

      sonar.pullrequest.key=$CI_MERGE_REQUEST_ID
      sonar.pullrequest.branch=$CI_MERGE_REQUEST_SOURCE_BRANCH_NAME
      sonar.pullrequest.base=$CI_MERGE_REQUEST_TARGET_BRANCH_NAME

      See com.sonarsource.branch.ciproviders.Cirrus for an example

      Documentation

      Prepare examples of GitLab CI scanner usage as it will be needed as an input for documentation

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              duarte.meneses Duarte Meneses
              Reporter:
              jacek.poreda Jacek Poreda
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Due:
                Created:
                Updated:
                Resolved: