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

cmclient call needs to quote the file path

This commit is contained in:
Roland Stengel 2018-08-28 15:29:08 +02:00
parent e7d0f6b1ca
commit 67429626a7
2 changed files with 2 additions and 2 deletions

View File

@ -91,7 +91,7 @@ public class ChangeManagement implements Serializable {
void uploadFileToTransportRequest(String changeId, String transportRequestId, String applicationId, String filePath, String endpoint, String credentialsId, String cmclientOpts = '') {
int rc = executeWithCredentials(endpoint, credentialsId, 'upload-file-to-transport', ['-cID', changeId,
'-tID', transportRequestId,
applicationId, filePath],
applicationId, "\"$filePath\""],
cmclientOpts) as int
if(rc == 0) {

View File

@ -186,7 +186,7 @@ public void testGetCommandLineWithCMClientOpts() {
public void testUploadFileToTransportSucceeds() {
// the regex provided below is an implicit check that the command line is fine.
script.setReturnValue(JenkinsShellCallRule.Type.REGEX,, 'upload-file-to-transport.*-cID 001 -tID 002 XXX /path', 0)
script.setReturnValue(JenkinsShellCallRule.Type.REGEX,, 'upload-file-to-transport.*-cID 001 -tID 002 XXX "/path"', 0)
new ChangeManagement(nullScript).uploadFileToTransportRequest('001',
'002',