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 2019/11/12 22:50:31 UTC
svn commit: r1869712 - in /poi/trunk: build.gradle jenkins/create_jobs.groovy
Author: kiwiwings
Date: Tue Nov 12 22:50:30 2019
New Revision: 1869712
URL: http://svn.apache.org/viewvc?rev=1869712&view=rev
Log:
migrate to sonarcloud.io
Modified:
poi/trunk/build.gradle
poi/trunk/jenkins/create_jobs.groovy
Modified: poi/trunk/build.gradle
URL: http://svn.apache.org/viewvc/poi/trunk/build.gradle?rev=1869712&r1=1869711&r2=1869712&view=diff
==============================================================================
--- poi/trunk/build.gradle (original)
+++ poi/trunk/build.gradle Tue Nov 12 22:50:30 2019
@@ -20,8 +20,8 @@ buildscript {
}
dependencies {
- classpath 'me.champeau.gradle:japicmp-gradle-plugin:0.1.2' // 2.x requires Gradle >=4
- classpath "org.sonarsource.scanner.gradle:sonarqube-gradle-plugin:2.5"
+ classpath 'me.champeau.gradle:japicmp-gradle-plugin:0.2.8' // 2.x requires Gradle >=4
+ classpath "org.sonarsource.scanner.gradle:sonarqube-gradle-plugin:2.8"
}
}
Modified: poi/trunk/jenkins/create_jobs.groovy
URL: http://svn.apache.org/viewvc/poi/trunk/jenkins/create_jobs.groovy?rev=1869712&r1=1869711&r2=1869712&view=diff
==============================================================================
--- poi/trunk/jenkins/create_jobs.groovy (original)
+++ poi/trunk/jenkins/create_jobs.groovy Tue Nov 12 22:50:30 2019
@@ -135,6 +135,8 @@ def apicheckDesc = '''
</p>
'''
+def sonarOptions = '-Dsonar.projectKey=poi-parent -Dsonar.organization=apache -Dsonar.host.url=https://sonarcloud.io '
+
def sonarDesc = '''
<p>
<b><a href="lastSuccessfulBuild/findbugsResult/" target="_blank">Findbugs report of latest build</a></b> -
@@ -297,7 +299,9 @@ poijobs.each { poijob ->
*/
maven {
if(poijob.sonar) {
- goals('compile $SONAR_MAVEN_GOAL -Dsonar.host.url=$SONAR_HOST_URL')
+ withCredentials([string(credentialsId: 'sonarcloud-poi', variable: 'SONAR_TOKEN')]) {
+ goals('compile sonar:sonar -Dsonar.login=${SONAR_TOKEN} ' + sonarOptions)
+ }
} else {
goals('package')
}
@@ -364,11 +368,13 @@ poijobs.each { poijob ->
} else if(poijob.sonar) {
steps {
shellEx(delegate, shellcmds, poijob)
- gradle {
- switches('-PenableSonar')
- switches('-Dsonar.host.url=$SONAR_HOST_URL')
- tasks('sonarqube')
- useWrapper(false)
+ withCredentials([string(credentialsId: 'sonarcloud-poi', variable: 'SONAR_TOKEN')]) {
+ gradle {
+ switches('-PenableSonar')
+ switches('-Dsonar.login=${SONAR_TOKEN} ' + sonarOptions)
+ tasks('sonarqube')
+ useWrapper(false)
+ }
}
}
publishers {
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@poi.apache.org
For additional commands, e-mail: commits-help@poi.apache.org