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 e85e326  Attempting to get the right workspace directory in parallel 
nodes using a withEnv block. fix; envs should be prefixed with the `env.` 
prefix.
e85e326 is described below

commit e85e326d9d7f00baa0f532cf5fda3abd80ae0833
Author: Martin Kanters <[email protected]>
AuthorDate: Mon Oct 5 15:37:26 2020 +0200

    Attempting to get the right workspace directory in parallel nodes using a 
withEnv block. fix; envs should be prefixed with the `env.` prefix.
---
 vars/asfMavenTlpStdBuild.groovy | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

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

Reply via email to