From b75c5afe2a6a544f8e3882b346bc961b51175c07 Mon Sep 17 00:00:00 2001 From: Mark Waite Date: Tue, 12 Sep 2023 18:22:14 -0600 Subject: [PATCH] Allow developer control of parallel testing Move the definition of parallel testing from the Maven pom file into the Jenkinsfile so that ci.jenkins.io continues to run the tests with one process per available core, while developers are allowed to configure the amount of parallel testing based on the configuration and use of their computer. Developers can adjust parallel execution by passing a command line argument to Maven like this: mvn clean -DforkCount=1C verify Developers can define a Maven profile that sets the forkCount in their ~/.m2/settings.xml like this: faster true .45C With that entry in the settings.xml file, then 0.45C will be used for: mvn clean verify --- Jenkinsfile | 2 +- pom.xml | 14 -------------- 2 files changed, 1 insertion(+), 15 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index f1619baf..cc3400e1 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -1,4 +1,4 @@ -buildPlugin(useContainerAgent: true, configurations: [ +buildPlugin(useContainerAgent: true, forkCount: '1C', configurations: [ [platform: 'linux', jdk: '11'], [platform: 'linux', jdk: '17'], ]) diff --git a/pom.xml b/pom.xml index 9835b608..1ff1b13e 100644 --- a/pom.xml +++ b/pom.xml @@ -110,20 +110,6 @@ - - - - org.apache.maven.plugins - maven-surefire-plugin - - all - true - 1C - - - - - repo.jenkins-ci.org