configuration-as-code-plugin/demos/sonarqube
dependabot[bot] 9552a22a12
Bump sonar from 2.7 to 2.13.1 (#1664)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Tim Jacomb <timjacomb1+github@gmail.com>
Co-authored-by: Tim Jacomb <21194782+timja@users.noreply.github.com>
2021-08-07 15:57:00 +01:00
..
README.md Bump sonar from 2.7 to 2.13.1 (#1664) 2021-08-07 15:57:00 +01:00

README.md

configure sonar plugin

sample configuration

Sample configuration for the SonarQube plugin.

Below sample configuration willingly set all attributes values because of current issues with Sonar plugin 2.9 version. (cf. #982)

credentials:
  system:
    domainCredentials:
      - credentials:
        - string:
            scope: GLOBAL
            id: "token"
            secret: "secret value"
            description: "Sonar token"

unclassified:
  sonarglobalconfiguration:                  # mandatory
    buildWrapperEnabled: true
    installations:                           # mandatory
      - name: "TEST"                         # id of the SonarQube configuration - to be used in jobs
        serverUrl: "http://url:9000"
        credentialsId: token       # id of the credentials containing sonar auth token (since 2.9 version)
        #serverAuthenticationToken: "token"   # for retrocompatibility with versions < 2.9
        mojoVersion: "mojoVersion"
        additionalProperties: "blah=blah"
        additionalAnalysisProperties: "additionalAnalysisProperties"
        triggers:
          skipScmCause: true
          skipUpstreamCause: true
          envVar: "envVar"

notes

You can add multiple installations.