1
0
mirror of https://github.com/SAP/jenkins-library.git synced 2025-01-18 05:18:24 +02:00

applicationId -> applicationName for RFC file upload

This commit is contained in:
Marcus Holl 2019-02-07 08:26:31 +01:00
parent 200e18f468
commit fd5a07d403
4 changed files with 12 additions and 16 deletions

View File

@ -162,7 +162,6 @@ public class ChangeManagement implements Serializable {
void uploadFileToTransportRequestCTS(
String transportRequestId,
String applicationId,
String filePath,
String endpoint,
String credentialsId,
@ -188,7 +187,7 @@ public class ChangeManagement implements Serializable {
String dockerImage,
List dockerOptions,
String transportRequestId,
String applicationId,
String applicationName,
String filePath,
String endpoint,
String credentialsId,
@ -200,7 +199,7 @@ public class ChangeManagement implements Serializable {
def args = [
"--env ABAP_DEVELOPMENT_INSTANCE=${developmentInstance}",
"--env ABAP_DEVELOPMENT_CLIENT=${developmentClient}",
"--env ABAP_APPLICATION_NAME=${applicationId}",
"--env ABAP_APPLICATION_NAME=${applicationName}",
"--env ABAP_APPLICATION_DESC=${applicationDescription}",
"--env ABAP_PACKAGE=${abapPackage}",
"--env ZIP_FILE_URL=${filePath}",

View File

@ -160,14 +160,12 @@ public class TransportRequestUploadFileTest extends BasePiperTest {
ChangeManagement cm = new ChangeManagement(nullScript) {
void uploadFileToTransportRequestCTS(
String transportRequestId,
String applicationId,
String filePath,
String endpoint,
String credentialsId,
String cmclientOpts) {
cmUtilReceivedParams.transportRequestId = transportRequestId
cmUtilReceivedParams.applicationId = applicationId
cmUtilReceivedParams.filePath = filePath
cmUtilReceivedParams.endpoint = endpoint
cmUtilReceivedParams.credentialsId = credentialsId
@ -184,7 +182,6 @@ public class TransportRequestUploadFileTest extends BasePiperTest {
assert cmUtilReceivedParams ==
[
transportRequestId: '002',
applicationId: null,
filePath: '/path',
endpoint: 'https://example.org/cm',
credentialsId: 'CM',
@ -203,7 +200,7 @@ public class TransportRequestUploadFileTest extends BasePiperTest {
containsString('developmentClient'),
containsString('applicationDescription'),
containsString('abapPackage'),
containsString('applicationId')))
containsString('applicationName')))
stepRule.step.transportRequestUploadFile(script: nullScript,
transportRequestId: '123456', //no sanity check, can be read from git history
@ -244,7 +241,7 @@ public class TransportRequestUploadFileTest extends BasePiperTest {
dockerImage: dockerImage,
dockerOptions: dockerOptions,
transportRequestId: transportRequestId,
applicationId: applicationId,
applicationName: applicationId,
applicationURL: applicationURL,
endpoint: endpoint,
credentialsId: credentialsId,
@ -261,7 +258,7 @@ public class TransportRequestUploadFileTest extends BasePiperTest {
changeManagement: [type: 'RFC'],
developmentInstance:'001',
developmentClient: '002',
applicationId: '42',
applicationName: '42',
applicationDescription: 'Lorem ipsum',
abapPackage: 'XYZ',
cmUtils: cm,)
@ -271,7 +268,7 @@ public class TransportRequestUploadFileTest extends BasePiperTest {
dockerImage: 'rfc',
dockerOptions: [],
transportRequestId: '123456',
applicationId: '42',
applicationName: '42',
applicationURL: 'http://example.org/blobstore/xyz.zip',
endpoint: 'https://example.org/rfc',
credentialsId: 'CM',
@ -312,7 +309,7 @@ public class TransportRequestUploadFileTest extends BasePiperTest {
changeManagement: [type: 'RFC'],
developmentInstance:'001',
developmentClient: '002',
applicationId: '42',
applicationName: '42',
applicationDescription: 'Lorem ipsum',
abapPackage: 'XYZ',
cmUtils: cm,)

View File

@ -262,7 +262,6 @@ public void testGetCommandLineWithCMClientOpts() {
new ChangeManagement(nullScript).uploadFileToTransportRequestCTS(
'002',
null,
'/path',
'https://example.org/cm',
'me')

View File

@ -21,7 +21,8 @@ import static com.sap.piper.cm.StepHelpers.getBackendTypeAndLogInfoIfCMIntegrati
]
@Field Set STEP_CONFIG_KEYS = GENERAL_CONFIG_KEYS.plus([
'applicationId',
'applicationName', // RFC
'applicationId', // SOLMAN
'developmentInstance',
'developmentClient',
'applicationDescription',
@ -71,7 +72,8 @@ void call(parameters = [:]) {
.withMandatoryProperty('developmentClient', null, { backendType == BackendType.RFC })
.withMandatoryProperty('applicationDescription', null, { backendType == BackendType.RFC })
.withMandatoryProperty('abapPackage', null, { backendType == BackendType.RFC })
.withMandatoryProperty('applicationId', null, {backendType in [BackendType.SOLMAN, BackendType.RFC]})
.withMandatoryProperty('applicationId', null, {backendType == BackendType.SOLMAN})
.withMandatoryProperty('applicationName', null, {backendType == BackendType.RFC})
new Utils().pushToSWA([
step: STEP_NAME,
@ -129,7 +131,6 @@ void call(parameters = [:]) {
case BackendType.CTS:
cm.uploadFileToTransportRequestCTS(
configuration.transportRequestId,
configuration.applicationId,
configuration.filePath,
configuration.changeManagement.endpoint,
configuration.changeManagement.credentialsId,
@ -140,7 +141,7 @@ void call(parameters = [:]) {
configuration.changeManagement.rfc.dockerImage,
configuration.changeManagement.rfc.dockerOptions ?: [],
configuration.transportRequestId,
configuration.applicationId,
configuration.applicationName,
configuration.applicationUrl,
configuration.changeManagement.endpoint,
configuration.changeManagement.credentialsId,