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

martinkanters pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/maven-jenkins-lib.git


The following commit(s) were added to refs/heads/master by this push:
     new e74efb6  Using $WORKSPACE instead of env.WORKSPACE as this could 
behave inconsistent when used on parallel nodes.
e74efb6 is described below

commit e74efb6cdba4a88a5dbea0c1d53fa0bc475c3bd5
Author: Martin Kanters <martinkant...@apache.org>
AuthorDate: Mon Oct 5 15:23:11 2020 +0200

    Using $WORKSPACE instead of env.WORKSPACE as this could behave inconsistent 
when used on parallel nodes.
---
 vars/asfMavenTlpStdBuild.groovy | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/vars/asfMavenTlpStdBuild.groovy b/vars/asfMavenTlpStdBuild.groovy
index d490623..8b3775f 100644
--- a/vars/asfMavenTlpStdBuild.groovy
+++ b/vars/asfMavenTlpStdBuild.groovy
@@ -76,7 +76,7 @@ def call(Map params = [:]) {
         String stageId = "${os}-jdk${jdk}"
         tasks[stageId] = {
           node("${label}") {
-            def wsDir = env.WORKSPACE
+            def wsDir = $WORKSPACE // env.WORKSPACE could not work as expected 
in parallel tasks 
(https://issues.jenkins-ci.org/plugins/servlet/mobile#issue/JENKINS-33511)
             if (os == 'windows' && tmpWs) {
               wsDir = 'F:\\short\\' + 
"$BUILD_TAG".replaceAll(/(.+)_maven-box_maven-(.+)/) { "m-${it[2]}" }
             }

Reply via email to