feat(Sonar) Add Sonar tool to Template

This commit is contained in:
mfeix 2021-07-23 10:47:12 +02:00
parent a16ef0ae08
commit f4a57076bc
No known key found for this signature in database
GPG Key ID: 04D016E104A25F03
3 changed files with 38 additions and 1 deletions

View File

@ -0,0 +1,17 @@
:sourcedir: ../../../
= sonar-template
Ruft den Sonar Job für das Projekt auf.
Mehr Details zu finden hier: https://gitlab.exxcellent.de/gilden/ci/exxcellent-sonar-tool[Gilde CI/CD: exxcellent-sonar-tool].
.Variables
|===
|Name |Description | Default Value
|SONAR_PROJECT_KEY | Der Sonar-Projekt-Key. | ""
|===
.sonar-template
----
include::{sourcedir}/tool-sonar7.gitlab-ci.yml[]
----

View File

@ -35,20 +35,24 @@ toc::[]
include::chapters/generalInformation.adoc[leveloffset=1] include::chapters/generalInformation.adoc[leveloffset=1]
== Container Templates == Container Templates
include::chapters/templates/container-publish.adoc[leveloffset=2] include::chapters/templates/container-publish.adoc[leveloffset=2]
include::chapters/templates/container-scan.adoc[leveloffset=2] include::chapters/templates/container-scan.adoc[leveloffset=2]
== Versionierungs Templates == Versionierungs Templates
Im folgende sind erweiterte Templates zu finden für das https://gitlab.exxcellent.de/gilden/ci/exxcellent-increase-version-tool[Increase-Version-Tool] der CI Gilde. Es enthält auch eine Child-Pipeline-Konfiguration um den Versionierungsprozess innerhalb einer Pipeline darzustellen. Im folgende sind erweiterte Templates zu finden für das https://gitlab.exxcellent.de/gilden/ci/exxcellent-increase-version-tool[Increase-Version-Tool] der CI Gilde.
Es enthält auch eine Child-Pipeline-Konfiguration um den Versionierungsprozess innerhalb einer Pipeline darzustellen.
=== Templates === Templates
include::chapters/templates/push-tag-and-version-template.adoc[leveloffset=3] include::chapters/templates/push-tag-and-version-template.adoc[leveloffset=3]
include::chapters/templates/set-version-template.adoc[leveloffset=3] include::chapters/templates/set-version-template.adoc[leveloffset=3]
include::chapters/templates/release-template.adoc[leveloffset=3] include::chapters/templates/release-template.adoc[leveloffset=3]
=== Pipeline === Pipeline
include::chapters/pipelines/update-version-pipeline.adoc[leveloffset=3] include::chapters/pipelines/update-version-pipeline.adoc[leveloffset=3]
== NPM Templates == NPM Templates
@ -66,4 +70,6 @@ include::chapters/templates/maven-verify-template.adoc[leveloffset=2]
== weitere Gilden-Tools == weitere Gilden-Tools
include::chapters/templates/sonar7.adoc[leveloffset=2]
Weitere Templates für die Tools der CI Gilde, sind in den jeweiligen Repos zu finden. Weitere Templates für die Tools der CI Gilde, sind in den jeweiligen Repos zu finden.

14
tool-sonar7.gitlab-ci.yml Normal file
View File

@ -0,0 +1,14 @@
.sonar-template:
stage: test
image: gitlab.exxcellent.de:4567/gilden/ci/exxcellent-sonar-tool:latest
variables:
SONAR_HOST_URL: http://sonar7.exxcellent.de/sonar7
SONAR_PROJECT_KEY: ""
SONAR_EXCLUSIONS: "**/target/**,**/src/test/**"
script:
- mvn test sonar:sonar
"-Dsonar.host.url=$SONAR_HOST_URL"
"-Dsonar.login=$SONAR_TOKEN"
"-Dsonar.projectKey=$SONAR_PROJECT_KEY"
"-Dsonar.exclusions=$SONAR_EXCLUSIONS"
- sonar-break-build