You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by kw...@apache.org on 2022/06/21 07:10:34 UTC

[sling-tooling-jenkins] branch bugfix/isolate-workspaces updated (20af77b -> be8fb6e)

This is an automated email from the ASF dual-hosted git repository.

kwin pushed a change to branch bugfix/isolate-workspaces
in repository https://gitbox.apache.org/repos/asf/sling-tooling-jenkins.git


 discard 20af77b  SLING-11401 properly isolate workspace directories
     new be8fb6e  SLING-11401 properly isolate workspace directories

This update added new revisions after undoing existing revisions.
That is to say, some revisions that were in the old version of the
branch are not in the new version.  This situation occurs
when a user --force pushes a change and generates a repository
containing something like this:

 * -- * -- B -- O -- O -- O   (20af77b)
            \
             N -- N -- N   refs/heads/bugfix/isolate-workspaces (be8fb6e)

You should already have received notification emails for all of the O
revisions, and so the following emails describe only the N revisions
from the common base, B.

Any revisions marked "omit" are not gone; other references still
refer to them.  Any revisions marked "discard" are gone forever.

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 vars/slingOsgiBundleBuild.groovy | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)


[sling-tooling-jenkins] 01/01: SLING-11401 properly isolate workspace directories

Posted by kw...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

kwin pushed a commit to branch bugfix/isolate-workspaces
in repository https://gitbox.apache.org/repos/asf/sling-tooling-jenkins.git

commit be8fb6e7d581e9f0efb6d84046b467104ff63d81
Author: Konrad Windszus <kw...@apache.org>
AuthorDate: Tue Jun 21 09:06:31 2022 +0200

    SLING-11401 properly isolate workspace directories
---
 vars/slingOsgiBundleBuild.groovy | 18 ++++++------------
 1 file changed, 6 insertions(+), 12 deletions(-)

diff --git a/vars/slingOsgiBundleBuild.groovy b/vars/slingOsgiBundleBuild.groovy
index c7b4488..d85c3b4 100644
--- a/vars/slingOsgiBundleBuild.groovy
+++ b/vars/slingOsgiBundleBuild.groovy
@@ -78,7 +78,7 @@ def call(Map params = [:]) {
                 if ( isReferenceStage ) {
                     referenceJdkVersion = jdkVersion
                 }
-                stepsMap["Build (Java ${jdkVersion})"] = stageDefinition.call()
+                stepsMap["Build (Java ${jdkVersion})"] = stageDefinition
                 isReferenceStage = false
                 currentBuild.result = "SUCCESS"
             }
@@ -178,8 +178,11 @@ def defineStage(def globalConfig, def jobConfig, def jdkVersion, boolean isRefer
     def branchConfig = jobConfig?.branches?."$env.BRANCH_NAME" ?: [:]
 
     return {
-        wrapInNode(branchConfig.nodeLabel ?: globalConfig.mainNodeLabel, {
+        node(nodeLabel: branchConfig.nodeLabel ?: globalConfig.mainNodeLabel,
+            customWorkspace: 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()
@@ -195,7 +198,7 @@ def defineStage(def globalConfig, def jobConfig, def jdkVersion, boolean isRefer
                     }
                 }
             }
-        })
+        }
     }
 }
 
@@ -278,12 +281,3 @@ boolean getShouldDeploy() {
 boolean isOnMainBranch() {
     return env.BRANCH_NAME == 'master'
 }
-
-def wrapInNode(def nodeLabel, Closure invocation) {
-    return {
-        node(nodeLabel) {
-            checkout scm
-            invocation.call()
-        }
-    }
-}