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/15 13:15:03 UTC

[GitHub] [sling-tooling-jenkins] rombert commented on a diff in pull request #8: Feature/parallel builds

rombert commented on code in PR #8:
URL: https://github.com/apache/sling-tooling-jenkins/pull/8#discussion_r897966096


##########
vars/slingOsgiBundleBuild.groovy:
##########
@@ -122,21 +161,117 @@ def defineStage(def globalConfig, def jobConfig, def jdkVersion, def isReference
         if ( isReferenceStage && jobConfig.archivePatterns ) {
             archiveArtifacts(artifacts: SlingJenkinsHelper.jsonArrayToCsv(jobConfig.archivePatterns), allowEmptyArchive: true)
         }
+        if ( isReferenceStage && goal == "deploy" && shouldDeploy ) {
+            // Stash the build results from the local deployment directory so we can deploy them on another node
+            stash name: 'local-snapshots-dir', includes: 'local-snapshots-dir/**'
+        }
     }
     
     def branchConfig = jobConfig?.branches?."$env.BRANCH_NAME" ?: [:]
-    if ( branchConfig.nodeLabel && branchConfig.nodeLabel != globalConfig.mainNodeLabel )
-        invocation = wrapInNode(invocation,branchConfig.nodeLabel)
-
 
     return {
-        stage("Build (Java ${jdkVersion}, ${goal})") {
-            invocation.call()
+        wrapInNode(branchConfig.nodeLabel ?: globalConfig.mainNodeLabel, {
+            echo "Running on node ${env.NODE_NAME}"
+            timeout(time: 30, unit: 'MINUTES') {
+                stage("Maven Build (Java ${jdkVersion}, ${goal})") {
+                    invocation.call()
+                }
+            }
+            if ( isReferenceStage ) {
+                // SonarQube (must be wrapped in same node)

Review Comment:
   Is this done to ensure that that the artifacts built earlier are used for the SonarQube analysis?



-- 
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