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

one shArgs array for all sh calls.

This commit is contained in:
Marcus Holl 2019-01-22 12:45:16 +01:00
parent b21541c9f6
commit ef8c4dafcf

View File

@ -257,10 +257,17 @@ public class ChangeManagement implements Serializable {
passwordVariable: 'password',
usernameVariable: 'username')]) {
Map shArgs = [:]
if(returnStdout)
shArgs.put('returnStdout', true)
else
shArgs.put('returnStatus', true)
if(type == BackendType.RFC) {
Map shArgs = [returnStatus: true,
'script': command]
shArgs.script = command
args = args.plus([
"--env ABAP_DEVELOPMENT_SERVER=${endpoint}",
"--env ABAP_DEVELOPMENT_USER=${script.username}",
@ -286,13 +293,7 @@ public class ChangeManagement implements Serializable {
command, args,
clientOpts)
Map shArgs = [:]
if(returnStdout)
shArgs.put('returnStdout', true)
else
shArgs.put('returnStatus', true)
shArgs.put('script', cmScript)
shArgs.script = cmScript
// user and password are masked by withCredentials
script.echo """[INFO] Executing command line: "${cmScript}"."""