Browse Source

Adding parameter for build threads

pull/52/head
Martin Stockhammer 4 years ago
parent
commit
0ad8ad66a1
1 changed files with 3 additions and 2 deletions
  1. 3
    2
      Jenkinsfile

+ 3
- 2
Jenkinsfile View File

@@ -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}"
}
}
}

Loading…
Cancel
Save