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:24:35 UTC

[sling-tooling-jenkins] branch bugfix/isolate-workspaces updated (9786087 -> b992995)

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 9786087  SLING-11401 properly isolate workspace directories
     new b992995  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   (9786087)
            \
             N -- N -- N   refs/heads/bugfix/isolate-workspaces (b992995)

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 | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)


[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 b992995565f980368231510cdf0b9e6c898bb366
Author: Konrad Windszus <kw...@apache.org>
AuthorDate: Tue Jun 21 09:06:31 2022 +0200

    SLING-11401 properly isolate workspace directories
---
 vars/slingOsgiBundleBuild.groovy | 40 +++++++++++++++++-----------------------
 1 file changed, 17 insertions(+), 23 deletions(-)

diff --git a/vars/slingOsgiBundleBuild.groovy b/vars/slingOsgiBundleBuild.groovy
index c7b4488..fbbf515 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,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) {
+            ws(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()
+                    }
                 }
-            }
-            if ( isReferenceStage ) {
-                // SonarQube must be executed on the same node in order to reuse artifact from the Maven build
-                if ( jobConfig.sonarQubeEnabled ) {
-                    stage('Analyse with SonarCloud') {
-                        timeout(time: 30, unit: 'MINUTES') {
-                            analyseWithSonarCloud(globalConfig, jobConfig)
+                if ( isReferenceStage ) {
+                    // SonarQube must be executed on the same node in order to reuse artifact from the Maven build
+                    if ( jobConfig.sonarQubeEnabled ) {
+                        stage('Analyse with SonarCloud') {
+                            timeout(time: 30, unit: 'MINUTES') {
+                                analyseWithSonarCloud(globalConfig, jobConfig)
+                            }
                         }
                     }
                 }
             }
-        })
+        }
     }
 }
 
@@ -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()
-        }
-    }
-}