Sets proper Sonar options in Jenkins pipeline and removes duplicated sonar properties

This commit is contained in:
Lukasz Lenart
2022-09-30 10:38:15 +02:00
parent 5338b44c23
commit e0da03c262
2 changed files with 3 additions and 7 deletions
Vendored
+2 -4
View File
@@ -79,7 +79,7 @@ pipeline {
}
stage('Test') {
steps {
sh './mvnw -B test'
sh './mvnw -B verify -Pcoverage -DskipAssembly'
}
post {
always {
@@ -88,18 +88,16 @@ pipeline {
}
}
}
/*
stage('Code Quality') {
when {
branch 'master'
}
steps {
withCredentials([string(credentialsId: 'asf-struts-sonarcloud', variable: 'SONARCLOUD_TOKEN')]) {
sh './mvnw sonar:sonar -DskipAssembly -Dsonar.login=${SONARCLOUD_TOKEN}'
sh './mvnw -B -Pcoverage -DskipAssembly -Dsonar.login=${SONARCLOUD_TOKEN} sonar:sonar'
}
}
}
*/
}
post {
always {
+1 -3
View File
@@ -125,9 +125,9 @@
<fluido-skin.version>1.9</fluido-skin.version>
<!-- Sonar -->
<sonar.organization>apache</sonar.organization>
<sonar.projectKey>apache_struts</sonar.projectKey>
<sonar.moduleKey>${project.artifactId}</sonar.moduleKey>
<sonar.organization>apache</sonar.organization>
<sonar.host.url>https://sonarcloud.io</sonar.host.url>
<sonar.exclusions>apps/**</sonar.exclusions>
@@ -213,8 +213,6 @@
<id>coverage</id>
<properties>
<sonar.host.url>https://sonarcloud.io</sonar.host.url>
<sonar.organization>apache</sonar.organization>
<sonar.projectKey>apache_struts</sonar.projectKey>
</properties>
<build>
<plugins>