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

return stdout when creating transport requests

This commit is contained in:
Marcus Holl 2018-09-25 10:08:20 +02:00
parent de05e1dc55
commit 97edb902c5

View File

@ -82,9 +82,9 @@ public class ChangeManagement implements Serializable {
try {
def transportRequest = executeWithCredentials(BackendType.CTS, endpoint, credentialsId, 'create-transport',
['-tt', transportType, '-ts', targetSystemId, '-d', "\"${description}\""],
false,
true,
clientOpts)
return transportRequest?.trim() as String
return (transportRequest as String)?.trim()
}catch(AbortException e) {
throw new ChangeManagementException("Cannot create a transport request. $e.message.")
}
@ -94,9 +94,9 @@ public class ChangeManagement implements Serializable {
try {
def transportRequest = executeWithCredentials(BackendType.SOLMAN, endpoint, credentialsId, 'create-transport', ['-cID', changeId, '-dID', developmentSystemId],
false,
true,
clientOpts)
return transportRequest.trim() as String
return (transportRequest as String)?.trim()
}catch(AbortException e) {
throw new ChangeManagementException("Cannot create a transport request for change id '$changeId'. $e.message.")
}