From cc2275689228b3dc3ddaac0af73d379a5333e15f Mon Sep 17 00:00:00 2001 From: Daniel Kasmeroglu Date: Thu, 22 Aug 2024 15:53:29 +0200 Subject: [PATCH] ~ experimental: jenkins pipeline for home server #6 --- Jenkinsfile | 11 +++++++---- sonar-project.properties | 15 +++++++++++++++ 2 files changed, 22 insertions(+), 4 deletions(-) create mode 100644 sonar-project.properties diff --git a/Jenkinsfile b/Jenkinsfile index 49028c2..c959eb8 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -31,12 +31,15 @@ pipeline { sh 'pnpm test' } } - // stage('SonarQube Analysis') { - // steps { + stage('SonarQube Analysis') { + steps { // properties such as sonar.host.url and sonar.login are configured in the m2 settings.xml for this profile // sh 'mvn clean verify -Psonar -Dsonar.projectKey=kcl' - // } - // } + withSonarQubeEnv('sonarqube') { + sh "./node_modules/sonar-scanner/bin/sonar-scanner" + } + } + } } } diff --git a/sonar-project.properties b/sonar-project.properties new file mode 100644 index 0000000..020aa2f --- /dev/null +++ b/sonar-project.properties @@ -0,0 +1,15 @@ +sonar.projectKey=remark-imagetools +sonar.projectName=remark-imagetools +sonar.projectVersion=0.1.3 + +# Path to the source files +sonar.sources=src + +# Specify the language if needed (e.g., JavaScript) +sonar.language=ts + +# Optional: Add coverage information +# sonar.javascript.lcov.reportPaths=coverage/lcov.info + +# Encoding of the source files +sonar.sourceEncoding=UTF-8