kwin commented on code in PR #10:
URL: 
https://github.com/apache/sling-tooling-jenkins/pull/10#discussion_r902258462


##########
vars/slingOsgiBundleBuild.groovy:
##########
@@ -178,24 +178,27 @@ def defineStage(def globalConfig, def jobConfig, def 
jdkVersion, boolean isRefer
     def branchConfig = jobConfig?.branches?."$env.BRANCH_NAME" ?: [:]
 
     return {
-        wrapInNode(branchConfig.nodeLabel ?: globalConfig.mainNodeLabel, {
-            timeout(time: 30, unit: 'MINUTES') {
-                stage("Maven Build (Java ${jdkVersion}, ${goal})") {
-                    echo "Running on node ${env.NODE_NAME}"
-                    invocation.call()
+        node(branchConfig.nodeLabel ?: globalConfig.mainNodeLabel) {
+            dir(jenkinsJdkLabel) { // isolate parallel builds on same node
+                timeout(time: 30, unit: 'MINUTES') {
+                    checkout scm
+                    stage("Maven Build (Java ${jdkVersion}, ${goal})") {
+                        echo "Running on node ${env.NODE_NAME}"
+                        invocation.call()

Review Comment:
   @rombert Should we also use isolated Maven repositories 
(https://www.jenkins.io/doc/pipeline/steps/pipeline-maven/#withmaven-provide-maven-environment,
 `mavenLocalRepo`?). That will lead to increased build times again, but not 
sure if Maven 3.8.6 really supports parallel access of repo yet 
(https://maven.apache.org/resolver/maven-resolver-named-locks/index.html)



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to