aboutsummaryrefslogtreecommitdiffstats
path: root/jenkins
diff options
context:
space:
mode:
authorAndreas Beeker <kiwiwings@apache.org>2022-01-08 18:22:12 +0000
committerAndreas Beeker <kiwiwings@apache.org>2022-01-08 18:22:12 +0000
commit1533af4f1d33af8a8fd74b4d6af92f0bc0fa3901 (patch)
tree019cbd5f2893bb72a752aa9eb0b30167aa478e53 /jenkins
parentf331af5a52a8d703b2c3b17f8ea01d3f903d0114 (diff)
downloadpoi-1533af4f1d33af8a8fd74b4d6af92f0bc0fa3901.tar.gz
poi-1533af4f1d33af8a8fd74b4d6af92f0bc0fa3901.zip
activate xmlbeans sonarqube
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1896837 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'jenkins')
-rw-r--r--jenkins/create_jobs.groovy30
1 files changed, 23 insertions, 7 deletions
diff --git a/jenkins/create_jobs.groovy b/jenkins/create_jobs.groovy
index 02731b2cf3..240dd0067a 100644
--- a/jenkins/create_jobs.groovy
+++ b/jenkins/create_jobs.groovy
@@ -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)
}
}