You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@archiva.apache.org by ma...@apache.org on 2019/10/13 09:32:16 UTC

[archiva] branch master updated: Adding parameter for build threads

This is an automated email from the ASF dual-hosted git repository.

martin_s pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/archiva.git


The following commit(s) were added to refs/heads/master by this push:
     new 0ad8ad6  Adding parameter for build threads
0ad8ad6 is described below

commit 0ad8ad66a1968d4f98f5717a2e5a8722126ccf96
Author: Martin Stockhammer <ma...@apache.org>
AuthorDate: Sun Oct 13 11:32:10 2019 +0200

    Adding parameter for build threads
---
 Jenkinsfile | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/Jenkinsfile b/Jenkinsfile
index d1f23f1..592e08b 100644
--- a/Jenkinsfile
+++ b/Jenkinsfile
@@ -52,6 +52,7 @@ pipeline {
     }
     parameters {
         booleanParam(name: 'PRECLEANUP', defaultValue: false, description: 'Clears the local maven repository before build.')
+        string(name: 'THREADS', defaultValue: '3', description: 'Number of threads for the mvn build (-T option). Must be a integer value>0.')
     }
     environment {          
         LOCAL_REPOSITORY = "../.maven_repositories/${env.EXECUTOR_NUMBER}"
@@ -98,7 +99,7 @@ pipeline {
                                 // -Dmaven.compiler.fork=true: Do compile in a separate forked process
                                 // -Dmaven.test.failure.ignore=true: Do not stop, if some tests fail
                                 // -Pci-build: Profile for CI-Server
-                                sh "mvn clean deploy -B -U -e -fae -Dmaven.compiler.fork=true -Pci-build -T3"
+                                sh "mvn clean deploy -B -U -e -fae -Dmaven.compiler.fork=true -Pci-build -T${THREADS}"
                             }
                 }
             }
@@ -139,7 +140,7 @@ pipeline {
                                           options: publishers
                                 )
                                         {
-                                            sh "mvn clean install -U -B -e -fae -Dmaven.compiler.fork=true -Pci-build -T3"
+                                            sh "mvn clean install -U -B -e -fae -Dmaven.compiler.fork=true -Pci-build -T${THREADS}"
                                         }
                             }
                         }