Skip to content

Commit b1378b5

Browse files
committed
Fix profiles
1 parent 6dbb473 commit b1378b5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

vars/mavenCiPipeline.groovy

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ def call(Closure closure) {
3333
}
3434

3535
buildEnv.inside {
36-
withMaven(globalMavenSettingsConfig: globalMavenSettingsConfig, mavenLocalRepo: '.m2') {
36+
configFileProvider([configFile(fileId: globalMavenSettingsConfig, variable: "MAVEN_SETTINGS")]) {
3737
/*
3838
* Clone the repository and make sure that the pom.xml file is structurally valid and has a GAV
3939
*/
@@ -83,7 +83,7 @@ def call(Closure closure) {
8383
withCredentials([string(credentialsId: 'gpg-signing-key-id', variable: 'GPG_KEYID'), file(credentialsId: 'gpg-signing-key', variable: 'GPG_SIGNING_KEY')]) {
8484
sh 'gpg --allow-secret-key-import --import $GPG_SIGNING_KEY && echo "$GPG_KEYID:6:" | gpg --import-ownertrust'
8585

86-
sh "mvn ${mavenArgs} ${isDeployableBranch ? mavenDeployGoals : mavenNonDeployGoals} ${isDeployableBranch ? mavenDeployArgs : mavenNonDeployArgs} \"-Dgpg.keyname=$GPG_KEYID\""
86+
sh "mvn -s \\\"$MAVEN_SETTINGS\\\" \\\"-Dmaven.repo.local=$WORKSPACE/.m2\\\" ${mavenArgs} ${isDeployableBranch ? mavenDeployGoals : mavenNonDeployGoals} ${isDeployableBranch ? mavenDeployArgs : mavenNonDeployArgs} \"-Dgpg.keyname=$GPG_KEYID\""
8787
}
8888
archiveArtifacts 'target/checkout/**/pom.xml'
8989

0 commit comments

Comments
 (0)