1
0
mirror of https://github.com/SAP/jenkins-library.git synced 2024-12-14 11:03:09 +02:00

Merge pull request #750 from SAP/pr/fixmta

Fix PATH substitution
This commit is contained in:
Thorsten Duda 2019-06-13 14:57:09 +02:00 committed by GitHub
commit 9d955f61c0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 3 deletions

View File

@ -52,7 +52,6 @@ public class MtaBuildTest extends BasePiperTest {
OpenJDK 64-Bit Server VM (build 25.121-b13, mixed mode)''') OpenJDK 64-Bit Server VM (build 25.121-b13, mixed mode)''')
shellRule.setReturnValue(JenkinsShellCallRule.Type.REGEX, '.*mta\\.jar -v.*', '1.0.6') 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') 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')}
} }

View File

@ -127,7 +127,7 @@ void call(Map parameters = [:]) {
echo "[INFO] Executing mta build call: '${mtaCall}'." echo "[INFO] Executing mta build call: '${mtaCall}'."
sh """#!/bin/bash sh """#!/bin/bash
export PATH=./node_modules/.bin:${PATH} export PATH=./node_modules/.bin:\$PATH
$mtaCall $mtaCall
""" """