This is an automated email from the ASF dual-hosted git repository.

lukaszlenart pushed a commit to branch WW-5184-log
in repository https://gitbox.apache.org/repos/asf/struts.git


The following commit(s) were added to refs/heads/WW-5184-log by this push:
     new e0da03c26 Sets proper Sonar options in Jenkins pipeline and removes 
duplicated sonar properties
e0da03c26 is described below

commit e0da03c2627530c0e77eca94ee5351c733be795c
Author: Lukasz Lenart <[email protected]>
AuthorDate: Fri Sep 30 10:38:15 2022 +0200

    Sets proper Sonar options in Jenkins pipeline and removes duplicated sonar 
properties
---
 Jenkinsfile | 6 ++----
 pom.xml     | 4 +---
 2 files changed, 3 insertions(+), 7 deletions(-)

diff --git a/Jenkinsfile b/Jenkinsfile
index 762d88240..2adf56ac9 100644
--- a/Jenkinsfile
+++ b/Jenkinsfile
@@ -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 {
diff --git a/pom.xml b/pom.xml
index ff48f95f1..b80a4b2f6 100644
--- a/pom.xml
+++ b/pom.xml
@@ -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>

Reply via email to