From a4b6cf895b26ee3cda9d4e33f9c061da8d541ce1 Mon Sep 17 00:00:00 2001 From: Andreas Beeker Date: Tue, 7 Jan 2020 21:15:33 +0000 Subject: [PATCH] test if sonar can be configured via properties file sonarcloud complained about jacoco native report paths git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1872469 13f79535-47bb-0310-9956-ffa450edef68 --- jenkins/create_jobs.groovy | 8 +------- sonar/sonar-project.properties | 11 +++++++++++ 2 files changed, 12 insertions(+), 7 deletions(-) create mode 100644 sonar/sonar-project.properties diff --git a/jenkins/create_jobs.groovy b/jenkins/create_jobs.groovy index 5ce9bf7e1c..d15ed0dab6 100644 --- a/jenkins/create_jobs.groovy +++ b/jenkins/create_jobs.groovy @@ -3,7 +3,7 @@ // // See https://github.com/jenkinsci/job-dsl-plugin/wiki for information about the DSL, you can // use http://job-dsl.herokuapp.com/ to validate the code before checkin -// +// def triggerSundays = ''' # only run this once per week on Sundays @@ -294,10 +294,7 @@ poijobs.each { poijob -> maven { if (poijob.sonar) { goals('clean package sonar:sonar') - property('sonar.host.url', 'https://sonarcloud.io') property('sonar.login', '${POI_SONAR_TOKEN}') - property('sonar.projectKey', 'poi-parent') - property('sonar.organization', 'apache') } else { goals('package') } @@ -367,10 +364,7 @@ poijobs.each { poijob -> gradle { switches('-PenableSonar') - switches('-Dsonar.host.url=https://sonarcloud.io') switches('-Dsonar.login=${POI_SONAR_TOKEN}') - switches('-Dsonar.projectKey=poi-parent') - switches('-Dsonar.organization=apache') tasks('sonarqube') useWrapper(false) } diff --git a/sonar/sonar-project.properties b/sonar/sonar-project.properties new file mode 100644 index 0000000000..541d3b3825 --- /dev/null +++ b/sonar/sonar-project.properties @@ -0,0 +1,11 @@ +# Sonar configuration file: +# see https://sonarcloud.io/documentation/analysis/scan/sonarscanner/ +# and https://sonarcloud.io/documentation/analysis/analysis-parameters/ + +# Organization and project keys are displayed in the right sidebar of the project homepage +sonar.organization=apache +sonar.projectKey=poi-parent +sonar.host.url=https://sonarcloud.io + +sonar.jacoco.reportPaths=target/jacoco.exec +sonar.coverage.jacoco.xmlReportPaths=target/site/jacoco/jacoco.xml \ No newline at end of file -- 2.39.5