You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@poi.apache.org by ki...@apache.org on 2022/01/08 18:22:12 UTC

svn commit: r1896837 - /poi/trunk/jenkins/create_jobs.groovy

Author: kiwiwings
Date: Sat Jan  8 18:22:12 2022
New Revision: 1896837

URL: http://svn.apache.org/viewvc?rev=1896837&view=rev
Log:
activate xmlbeans sonarqube

Modified:
    poi/trunk/jenkins/create_jobs.groovy

Modified: poi/trunk/jenkins/create_jobs.groovy
URL: http://svn.apache.org/viewvc/poi/trunk/jenkins/create_jobs.groovy?rev=1896837&r1=1896836&r2=1896837&view=diff
==============================================================================
--- poi/trunk/jenkins/create_jobs.groovy (original)
+++ poi/trunk/jenkins/create_jobs.groovy Sat Jan  8 18:22:12 2022
@@ -133,7 +133,11 @@ def xmlbeansjobs = [
         [ name: 'POI-XMLBeans-DSL-1.17', jdk: '1.17', trigger: triggerSundays, skipcigame: true
         ],
         [ name: 'POI-XMLBeans-DSL-1.18', jdk: '1.18', trigger: triggerSundays, skipcigame: true
+        ],
+        [ name: 'POI-XMLBeans-DSL-Sonar', jdk: '1.11', trigger: triggerSundays, skipcigame: true,
+          sonar: true
         ]
+
 ]
 
 def svnBase = 'https://svn.apache.org/repos/asf/poi/trunk'
@@ -519,7 +523,7 @@ xmlbeansjobs.each { xjob ->
             disabled()
         }
 
-        description( defaultDesc + (xjob.apicheck ? apicheckDesc : sonarDesc) )
+        description( defaultDesc + (xjob.apicheck ? apicheckDesc : sonarDesc.replace('poi-parent','apache_xmlbeans')) )
         logRotator {
             numToKeep(5)
             artifactNumToKeep(1)
@@ -543,6 +547,14 @@ xmlbeansjobs.each { xjob ->
                 abortBuild()
                 writeDescription('Build was aborted due to timeout')
             }
+            if(xjob.sonar) {
+                credentialsBinding {
+                    string('POI_SONAR_TOKEN', 'sonarcloud-poi')
+                }
+                configure { project ->
+                    project / buildWrappers << 'hudson.plugins.sonar.SonarBuildWrapper' {}
+                }
+            }
         }
         jdk(jdkMapping.get(jdkKey))
         scm {
@@ -567,15 +579,19 @@ xmlbeansjobs.each { xjob ->
             }
 
             gradle {
-//                switches('-PenableSonar')
-//                switches('-Dsonar.login=${POI_SONAR_TOKEN}')
-//                switches('-Dsonar.organization=apache')
-//                switches('-Dsonar.projectKey=poi-parent')
-//                switches('-Dsonar.host.url=https://sonarcloud.io')
+                if (xjob.sonar) {
+                    switches('-PenableSonar')
+                    switches('-Dsonar.login=${POI_SONAR_TOKEN}')
+                    switches('-Dsonar.organization=apache')
+                    switches('-Dsonar.projectKey=apache_xmlbeans')
+                    switches('-Dsonar.host.url=https://sonarcloud.io')
+                }
                 tasks('clean')
                 tasks('jenkins')
                 tasks('jacocoTestReport')
-//                tasks('sonarqube')
+                if (xjob.sonar) {
+                    tasks('sonarqube')
+                }
                 useWrapper(true)
             }
         }



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@poi.apache.org
For additional commands, e-mail: commits-help@poi.apache.org