From a70fc10ae0ff84ef58621d47788521597da078cb Mon Sep 17 00:00:00 2001 From: Marcus Holl Date: Wed, 30 Jan 2019 10:16:38 +0100 Subject: [PATCH] Parameter applicationURL instead of file path --- test/groovy/TransportRequestUploadFileTest.groovy | 2 +- vars/transportRequestUploadFile.groovy | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/test/groovy/TransportRequestUploadFileTest.groovy b/test/groovy/TransportRequestUploadFileTest.groovy index 2c0c35916..c54baa10b 100644 --- a/test/groovy/TransportRequestUploadFileTest.groovy +++ b/test/groovy/TransportRequestUploadFileTest.groovy @@ -197,7 +197,7 @@ public class TransportRequestUploadFileTest extends BasePiperTest { helper.registerAllowedMethod('sh', [Map], {m -> return (m.script.startsWith('cts') ? 0 : 1)}) stepRule.step.transportRequestUploadFile(script: nullScript, - filePath: 'xyz.jar', + applicationUrl: 'http://example.org/blobstore/xyz.zip', transportRequestId: '123456', changeManagement: [type: 'RFC'], developmentInstance:'001', diff --git a/vars/transportRequestUploadFile.groovy b/vars/transportRequestUploadFile.groovy index c7bc0aca5..ea9145afc 100644 --- a/vars/transportRequestUploadFile.groovy +++ b/vars/transportRequestUploadFile.groovy @@ -31,6 +31,7 @@ import static com.sap.piper.cm.StepHelpers.getBackendTypeAndLogInfoIfCMIntegrati @Field Set PARAMETER_KEYS = STEP_CONFIG_KEYS.plus([ 'changeDocumentId', 'filePath', + 'applicationUrl', 'transportRequestId']) void call(parameters = [:]) { @@ -64,7 +65,8 @@ void call(parameters = [:]) { .withMandatoryProperty('changeManagement/git/from') .withMandatoryProperty('changeManagement/git/to') .withMandatoryProperty('changeManagement/git/format') - .withMandatoryProperty('filePath') + .withMandatoryProperty('filePath', null, { backendType in [BackendType.SOLMAN, BackendType.CTS] }) + .withMandatoryProperty('applicationUrl', null, { backendType == BackendType.RFC }) .withMandatoryProperty('developmentInstance', null, { backendType == BackendType.RFC }) .withMandatoryProperty('developmentClient', null, { backendType == BackendType.RFC }) .withMandatoryProperty('applicationDescription', null, { backendType == BackendType.RFC }) @@ -137,7 +139,7 @@ void call(parameters = [:]) { configuration.changeManagement.rfc.dockerOptions ?: [], configuration.transportRequestId, configuration.applicationId, - configuration.filePath, + configuration.applicationUrl, configuration.changeManagement.endpoint, configuration.changeManagement.credentialsId, configuration.developmentInstance,