Skip to content
This repository was archived by the owner on Apr 25, 2024. It is now read-only.

Commit 60d80f6

Browse files
committed
fix Jenkinsfile
Signed-off-by: Olivier Lamy <olamy@apache.org>
1 parent 19d50fa commit 60d80f6

1 file changed

Lines changed: 28 additions & 26 deletions

File tree

Jenkinsfile

Lines changed: 28 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -47,35 +47,37 @@ pipeline {
4747
steps {
4848
timeout(120) {
4949

50-
withEnv(["JAVA_HOME=${ tool "$buildJdk" }",
51-
"PATH+MAVEN=${ tool "$buildJdk" }/bin:${tool "buildMvn"}/bin",
52-
"MAVEN_OPTS=-Xms2g -Xmx4g -Djava.awt.headless=true"]) {
53-
configFileProvider(
54-
[configFile(fileId: 'archiva-uid-jenkins', variable: 'GLOBAL_MVN_SETTINGS')]) {
50+
withEnv(["JAVA_HOME=${ tool "$buildJdk" }",
51+
"PATH+MAVEN=${ tool "$buildJdk" }/bin:${tool "buildMvn"}/bin",
52+
"MAVEN_OPTS=-Xms2g -Xmx4g -Djava.awt.headless=true"]) {
53+
configFileProvider(
54+
[configFile(fileId: 'archiva-uid-jenkins', variable: 'GLOBAL_MVN_SETTINGS')]) {
5555

56-
// Needs a lot of time to reload the repository files, try without cleanup
57-
// Not sure, but maybe
58-
// sh "rm -rf .repository"
59-
sh "chmod 755 ./src/ci/scripts/prepareWorkspace.sh"
60-
sh "./src/ci/scripts/prepareWorkspace.sh -d .repository"
56+
// Needs a lot of time to reload the repository files, try without cleanup
57+
// Not sure, but maybe
58+
// sh "rm -rf .repository"
59+
sh "chmod 755 ./src/ci/scripts/prepareWorkspace.sh"
60+
sh "./src/ci/scripts/prepareWorkspace.sh -d .repository"
6161

62-
// Run test phase / ignore test failures
63-
// -B: Batch mode
64-
// -U: Force snapshot update
65-
// -e: Produce execution error messages
66-
// -fae: Fail at the end
67-
// -Dmaven.compiler.fork=false: Do not compile in a separate forked process
68-
// -Dmaven.test.failure.ignore=true: Do not stop, if some tests fail
69-
// -Pci-build: Profile for CI-Server
70-
script {
71-
if (env.BRANCH_NAME == 'master' || env.BRANCH_NAME == 'archiva-2.x') {
72-
sh "mvn clean deploy -B -U -e -fae -T2 -Pci-build -DretryFailedDeploymentCount=5 -s $GLOBAL_MVN_SETTINGS -Dmaven.repo.local=.repository"
73-
} else {
74-
sh "mvn clean install -B -U -e -fae -T2 -Pci-build -s $GLOBAL_MVN_SETTINGS -Dmaven.repo.local=.repository"
75-
}
62+
// Run test phase / ignore test failures
63+
// -B: Batch mode
64+
// -U: Force snapshot update
65+
// -e: Produce execution error messages
66+
// -fae: Fail at the end
67+
// -Dmaven.compiler.fork=false: Do not compile in a separate forked process
68+
// -Dmaven.test.failure.ignore=true: Do not stop, if some tests fail
69+
// -Pci-build: Profile for CI-Server
70+
script {
71+
if (env.BRANCH_NAME == 'master' || env.BRANCH_NAME == 'archiva-2.x') {
72+
sh "mvn clean deploy -B -U -e -fae -T2 -Pci-build -DretryFailedDeploymentCount=5 -s $GLOBAL_MVN_SETTINGS -Dmaven.repo.local=.repository"
73+
} else {
74+
sh "mvn clean install -B -U -e -fae -T2 -Pci-build -s $GLOBAL_MVN_SETTINGS -Dmaven.repo.local=.repository"
7675
}
76+
}
77+
78+
}
79+
}
7780

78-
}
7981
}
8082
}
8183
post {
@@ -132,4 +134,4 @@ def notifyBuild(String buildStatus) {
132134
)
133135
}
134136

135-
// vim: et:ts=4:sw=4:ft=groovy
137+
// vim: et:ts=4:sw=4:ft=groovy

0 commit comments

Comments
 (0)