]> source.dussan.org Git - archiva.git/commitdiff
fix Jenkinsfile
authorOlivier Lamy <olamy@apache.org>
Mon, 5 Sep 2022 07:08:10 +0000 (17:08 +1000)
committerOlivier Lamy <olamy@apache.org>
Mon, 5 Sep 2022 07:08:10 +0000 (17:08 +1000)
Signed-off-by: Olivier Lamy <olamy@apache.org>
Jenkinsfile

index bc630c65425511101e48bbd46d5244c866d2a1da..b56c26d0afb442c56ee8bba678af236c0de8bb36 100644 (file)
@@ -47,35 +47,37 @@ pipeline {
             steps {
                 timeout(120) {
 
-                      withEnv(["JAVA_HOME=${ tool "$buildJdk" }",
-                               "PATH+MAVEN=${ tool "$buildJdk" }/bin:${tool "buildMvn"}/bin",
-                               "MAVEN_OPTS=-Xms2g -Xmx4g -Djava.awt.headless=true"]) {
-                        configFileProvider(
-                                [configFile(fileId: 'archiva-uid-jenkins', variable: 'GLOBAL_MVN_SETTINGS')]) {
+                  withEnv(["JAVA_HOME=${ tool "$buildJdk" }",
+                           "PATH+MAVEN=${ tool "$buildJdk" }/bin:${tool "buildMvn"}/bin",
+                           "MAVEN_OPTS=-Xms2g -Xmx4g -Djava.awt.headless=true"]) {
+                    configFileProvider(
+                            [configFile(fileId: 'archiva-uid-jenkins', variable: 'GLOBAL_MVN_SETTINGS')]) {
 
-                                // Needs a lot of time to reload the repository files, try without cleanup
-                                // Not sure, but maybe
-                                // sh "rm -rf .repository"
-                                sh "chmod 755 ./src/ci/scripts/prepareWorkspace.sh"
-                                sh "./src/ci/scripts/prepareWorkspace.sh -d .repository"
+                            // Needs a lot of time to reload the repository files, try without cleanup
+                            // Not sure, but maybe
+                            // sh "rm -rf .repository"
+                            sh "chmod 755 ./src/ci/scripts/prepareWorkspace.sh"
+                            sh "./src/ci/scripts/prepareWorkspace.sh -d .repository"
 
-                                // Run test phase / ignore test failures
-                                // -B: Batch mode
-                                // -U: Force snapshot update
-                                // -e: Produce execution error messages
-                                // -fae: Fail at the end
-                                // -Dmaven.compiler.fork=false: Do not compile in a separate forked process
-                                // -Dmaven.test.failure.ignore=true: Do not stop, if some tests fail
-                                // -Pci-build: Profile for CI-Server
-                                script {
-                                    if (env.BRANCH_NAME == 'master' || env.BRANCH_NAME == 'archiva-2.x') {
-                                        sh "mvn clean deploy -B -U -e -fae -T2 -Pci-build -DretryFailedDeploymentCount=5 -s $GLOBAL_MVN_SETTINGS -Dmaven.repo.local=.repository"
-                                    } else {
-                                        sh "mvn clean install -B -U -e -fae -T2 -Pci-build -s $GLOBAL_MVN_SETTINGS -Dmaven.repo.local=.repository"
-                                    }
+                            // Run test phase / ignore test failures
+                            // -B: Batch mode
+                            // -U: Force snapshot update
+                            // -e: Produce execution error messages
+                            // -fae: Fail at the end
+                            // -Dmaven.compiler.fork=false: Do not compile in a separate forked process
+                            // -Dmaven.test.failure.ignore=true: Do not stop, if some tests fail
+                            // -Pci-build: Profile for CI-Server
+                            script {
+                                if (env.BRANCH_NAME == 'master' || env.BRANCH_NAME == 'archiva-2.x') {
+                                    sh "mvn clean deploy -B -U -e -fae -T2 -Pci-build -DretryFailedDeploymentCount=5 -s $GLOBAL_MVN_SETTINGS -Dmaven.repo.local=.repository"
+                                } else {
+                                    sh "mvn clean install -B -U -e -fae -T2 -Pci-build -s $GLOBAL_MVN_SETTINGS -Dmaven.repo.local=.repository"
                                 }
+                            }
+
+                    }
+                  }                    
 
-                        }
                 }
             }
             post {
@@ -132,4 +134,4 @@ def notifyBuild(String buildStatus) {
     )
 }
 
-// vim: et:ts=4:sw=4:ft=groovy
+// vim: et:ts=4:sw=4:ft=groovy
\ No newline at end of file