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

mattrpav pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/activemq.git


The following commit(s) were added to refs/heads/main by this push:
     new 03a9771fe4 [AMQ-9539] Add sonar quality analysis to Jenkins
03a9771fe4 is described below

commit 03a9771fe48415f0782c8330b6625567f454b561
Author: Matt Pavlovich <mattr...@apache.org>
AuthorDate: Tue Jul 23 16:43:33 2024 -0500

    [AMQ-9539] Add sonar quality analysis to Jenkins
---
 Jenkinsfile | 9 +++++++++
 pom.xml     | 6 ++++++
 2 files changed, 15 insertions(+)

diff --git a/Jenkinsfile b/Jenkinsfile
index 01bf07c935..55f7e3e6a5 100644
--- a/Jenkinsfile
+++ b/Jenkinsfile
@@ -44,6 +44,7 @@ pipeline {
     parameters {
         choice(name: 'nodeLabel', choices: ['ubuntu', 's390x', 'arm', 
'Windows']) 
         choice(name: 'jdkVersion', choices: ['jdk_17_latest', 'jdk_21_latest', 
'jdk_22_latest', 'jdk_17_latest_windows', 'jdk_21_latest_windows', 
'jdk_22_latest_windows']) 
+        booleanParam(name: 'sonarEnabled', defaultValue: false)
     }
 
     stages {
@@ -153,6 +154,14 @@ pipeline {
                 sh 'mvn -B -e deploy -Pdeploy -DskipTests'
             }
         }
+
+        stage('Quality') {
+            when { expression { return params.sonarEnabled } }
+            steps {
+                sh 'echo "Running the Sonar stage"'
+            }
+        }
+
     }
 
     // Do any post build stuff ... such as sending emails depending on the 
overall build result.
diff --git a/pom.xml b/pom.xml
index 804df48b7e..b53f130248 100644
--- a/pom.xml
+++ b/pom.xml
@@ -144,6 +144,7 @@
     <taglist-maven-plugin-version>3.0.0</taglist-maven-plugin-version>
     
<build-helper-maven-plugin-version>3.5.0</build-helper-maven-plugin-version>
     <replacer-maven-plugin-version>1.5.3</replacer-maven-plugin-version>
+    <sonar-maven-plugin-version>4.0.0.4121</sonar-maven-plugin-version>
     <apache-rat-plugin-version>0.16.1</apache-rat-plugin-version>
     <tools-maven-plugin-version>1.4</tools-maven-plugin-version>
     <depends-maven-plugin-version>1.5.0</depends-maven-plugin-version>
@@ -1150,6 +1151,11 @@
           <artifactId>replacer</artifactId>
           <version>${replacer-maven-plugin-version}</version>
         </plugin>
+        <plugin>
+          <groupId>org.sonarsource.scanner.maven</groupId>
+          <artifactId>sonar-maven-plugin</artifactId>
+          <version>${sonar-maven-plugin-version}</version>
+        </plugin>
         <!--This plugin's configuration is used to store Eclipse m2e settings 
only.
             It has no influence on the Maven build itself.-->
         <plugin>


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@activemq.apache.org
For additional commands, e-mail: commits-h...@activemq.apache.org
For further information, visit: https://activemq.apache.org/contact


Reply via email to