From f4a57076bce29d6c8d536d3904e55bf8edbd9eeb Mon Sep 17 00:00:00 2001 From: mfeix Date: Fri, 23 Jul 2021 10:47:12 +0200 Subject: [PATCH] feat(Sonar) Add Sonar tool to Template --- .../chapters/templates/tool-sonar7.adoc | 17 +++++++++++++++++ documentation/document.adoc | 8 +++++++- tool-sonar7.gitlab-ci.yml | 14 ++++++++++++++ 3 files changed, 38 insertions(+), 1 deletion(-) create mode 100644 documentation/chapters/templates/tool-sonar7.adoc create mode 100644 tool-sonar7.gitlab-ci.yml diff --git a/documentation/chapters/templates/tool-sonar7.adoc b/documentation/chapters/templates/tool-sonar7.adoc new file mode 100644 index 0000000..742c664 --- /dev/null +++ b/documentation/chapters/templates/tool-sonar7.adoc @@ -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[] +---- \ No newline at end of file diff --git a/documentation/document.adoc b/documentation/document.adoc index 8e69334..c4f9efd 100644 --- a/documentation/document.adoc +++ b/documentation/document.adoc @@ -35,20 +35,24 @@ toc::[] include::chapters/generalInformation.adoc[leveloffset=1] == Container Templates + include::chapters/templates/container-publish.adoc[leveloffset=2] include::chapters/templates/container-scan.adoc[leveloffset=2] == 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 + include::chapters/templates/push-tag-and-version-template.adoc[leveloffset=3] include::chapters/templates/set-version-template.adoc[leveloffset=3] include::chapters/templates/release-template.adoc[leveloffset=3] === Pipeline + include::chapters/pipelines/update-version-pipeline.adoc[leveloffset=3] == NPM Templates @@ -66,4 +70,6 @@ include::chapters/templates/maven-verify-template.adoc[leveloffset=2] == 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. diff --git a/tool-sonar7.gitlab-ci.yml b/tool-sonar7.gitlab-ci.yml new file mode 100644 index 0000000..3ddf48b --- /dev/null +++ b/tool-sonar7.gitlab-ci.yml @@ -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 \ No newline at end of file