You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by GitBox <gi...@apache.org> on 2022/06/21 07:35:54 UTC

[GitHub] [sling-tooling-jenkins] kwin commented on a diff in pull request #10: SLING-11401 properly isolate workspace directories

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: dev-unsubscribe@sling.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org