gilde-ci-cd/documentation/chapters/templates/static-analysis/tool-sonar.adoc
Marcel Feix 75799e32fc
Docs(*): Translate everything to english
Correction of some paths
2022-07-08 09:55:42 +02:00

27 lines
1.1 KiB
Plaintext

:sourcedir: ../../../../templates/
= sonar-template
The following templates provide integrations for Sonar
.Variables
|===
|Name |Description | Default Value
|SONAR_HOST_URL | The Url for the Sonar server | http://sonar7.exxcellent.de/sonar7
|SONAR_TOKEN | The Sonar token to call protected sonar funtkions | ""
|SONAR_PROJECT_KEY | The Sonar-Projekt-Key of your Project. | ""
|SONAR_PROJECT_NAME | The Sonar-Projekt-Name. | "" (If you set project.name in maven the POM value will be used if this is empty)
|SONAR_EXCLUSIONS | Paths that will not be scanned by Sonar | **/target/**,**/src/test/**
|===
TIP: Der SONAR_TOKEN String kann über den persönlichen User Bereich in Sonar unter dem Tab _Security_ erzeugt werden.
Ein technischer User ist aktuell nicht möglich.
Das Token wird ausschließlich dafür benötigt, wenn der Sonar Buildbreaker über die Pipeline aktiviert wird (_sonar.buildbreaker.skip=true_).
Wenn der Build nicht gebrochen werden soll, kann es weggelassen werden.
.sonar-template
[source,yaml]
----
include::{sourcedir}static-analysis/sonar.gitlab-ci.yml[]
----