diff --git a/test/groovy/MtaBuildTest.groovy b/test/groovy/MtaBuildTest.groovy index 2ae6f15b0..0cc67ea91 100644 --- a/test/groovy/MtaBuildTest.groovy +++ b/test/groovy/MtaBuildTest.groovy @@ -52,7 +52,6 @@ public class MtaBuildTest extends BasePiperTest { OpenJDK 64-Bit Server VM (build 25.121-b13, mixed mode)''') shellRule.setReturnValue(JenkinsShellCallRule.Type.REGEX, '.*mta\\.jar -v.*', '1.0.6') - binding.setVariable('PATH', '/usr/bin') } @@ -61,7 +60,7 @@ public class MtaBuildTest extends BasePiperTest { stepRule.step.mtaBuild(script: nullScript, buildTarget: 'NEO') - assert shellRule.shell.find { c -> c.contains('PATH=./node_modules/.bin:/usr/bin')} + assert shellRule.shell.find { c -> c.contains('PATH=./node_modules/.bin:$PATH')} } diff --git a/vars/mtaBuild.groovy b/vars/mtaBuild.groovy index 968479f88..93cbc770c 100644 --- a/vars/mtaBuild.groovy +++ b/vars/mtaBuild.groovy @@ -127,7 +127,7 @@ void call(Map parameters = [:]) { echo "[INFO] Executing mta build call: '${mtaCall}'." sh """#!/bin/bash - export PATH=./node_modules/.bin:${PATH} + export PATH=./node_modules/.bin:\$PATH $mtaCall """