diff options
author | Andreas Beeker <kiwiwings@apache.org> | 2019-11-12 23:30:01 +0000 |
---|---|---|
committer | Andreas Beeker <kiwiwings@apache.org> | 2019-11-12 23:30:01 +0000 |
commit | 435efd4d4e10380a9e7ce18f7fe287bc90beb839 (patch) | |
tree | 78e10fc6fb8821b9a82038312a21d8ccb97b22ac /jenkins | |
parent | 1aa9dbf0f922a5b6b295c3054ecd953d9930fc9d (diff) | |
download | poi-435efd4d4e10380a9e7ce18f7fe287bc90beb839.tar.gz poi-435efd4d4e10380a9e7ce18f7fe287bc90beb839.zip |
wrap everything in withCredentials - see https://github.com/jenkinsci/aws-credentials-plugin/issues/22
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1869714 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'jenkins')
-rw-r--r-- | jenkins/create_jobs.groovy | 29 |
1 files changed, 15 insertions, 14 deletions
diff --git a/jenkins/create_jobs.groovy b/jenkins/create_jobs.groovy index a4ac2d0647..05413d9a4e 100644 --- a/jenkins/create_jobs.groovy +++ b/jenkins/create_jobs.groovy @@ -286,18 +286,18 @@ poijobs.each { poijob -> // Create steps and publishers depending on the type of Job that is selected if(poijob.maven) { steps { - shellEx(delegate, shellcmds, poijob) - maven { - goals('clean') - rootPOM('sonar/pom.xml') - localRepository(LocalRepositoryLocation.LOCAL_TO_WORKSPACE) - mavenInstallation(defaultMaven) - } - /* Currently not done, let's see if it is still necessary: - # Maven-Download fails for strange reasons, try to workaround... - mkdir -p sonar/ooxml-schema-security/target/schemas && wget -O sonar/ooxml-schema-security/target/schemas/xmldsig-core-schema.xsd http://www.w3.org/TR/2002/REC-xmldsig-core-20020212/xmldsig-core-schema.xsd - */ - withCredentials([string(credentialsId: 'sonarcloud-poi', variable: 'SONAR_TOKEN')]) { + withCredentials(bindings: [string(credentialsId: 'sonarcloud-poi', variable: 'SONAR_TOKEN')]) { + shellEx(delegate, shellcmds, poijob) + maven { + goals('clean') + rootPOM('sonar/pom.xml') + localRepository(LocalRepositoryLocation.LOCAL_TO_WORKSPACE) + mavenInstallation(defaultMaven) + } + /* Currently not done, let's see if it is still necessary: + # Maven-Download fails for strange reasons, try to workaround... + mkdir -p sonar/ooxml-schema-security/target/schemas && wget -O sonar/ooxml-schema-security/target/schemas/xmldsig-core-schema.xsd http://www.w3.org/TR/2002/REC-xmldsig-core-20020212/xmldsig-core-schema.xsd + */ maven { if (poijob.sonar) { goals('compile sonar:sonar -Dsonar.login=${SONAR_TOKEN} ' + sonarOptions) @@ -367,8 +367,9 @@ poijobs.each { poijob -> } } else if(poijob.sonar) { steps { - shellEx(delegate, shellcmds, poijob) - withCredentials([string(credentialsId: 'sonarcloud-poi', variable: 'SONAR_TOKEN')]) { + withCredentials(bindings: [string(credentialsId: 'sonarcloud-poi', variable: 'SONAR_TOKEN')]) { + shellEx(delegate, shellcmds, poijob) + gradle { switches('-PenableSonar') switches('-Dsonar.login=${SONAR_TOKEN} ' + sonarOptions) |