1
0
mirror of https://github.com/SAP/jenkins-library.git synced 2025-03-03 15:02:35 +02:00

Support code page parameter

This commit is contained in:
Marcus Holl 2019-02-14 09:36:51 +01:00
parent af5d67aaf7
commit 80bd4cf11c
4 changed files with 22 additions and 8 deletions

View File

@ -204,7 +204,8 @@ public class ChangeManagement implements Serializable {
String developmentInstance,
String developmentClient,
String applicationDescription,
String abapPackage) {
String abapPackage,
String codePage) {
def args = [
ABAP_DEVELOPMENT_INSTANCE: developmentInstance,
@ -213,6 +214,7 @@ public class ChangeManagement implements Serializable {
ABAP_APPLICATION_DESC: applicationDescription,
ABAP_PACKAGE: abapPackage,
ZIP_FILE_URL: filePath,
CODE_PAGE: codePage,
]
int rc = executeWithCredentials(

View File

@ -234,7 +234,8 @@ public class TransportRequestUploadFileTest extends BasePiperTest {
String developmentInstance,
String developmentClient,
String applicationDescription,
String abapPackage) {
String abapPackage,
String codePage) {
cmUtilsReceivedParams = [
docker: docker,
@ -246,12 +247,14 @@ public class TransportRequestUploadFileTest extends BasePiperTest {
developmentInstance: developmentInstance,
developmentClient: developmentClient,
applicationDescription: applicationDescription,
abapPackage: abapPackage]
abapPackage: abapPackage,
codePage: codePage]
}
}
stepRule.step.transportRequestUploadFile(script: nullScript,
applicationUrl: 'http://example.org/blobstore/xyz.zip',
codePage: 'UTF-9',
transportRequestId: '123456',
changeManagement: [
type: 'RFC',
@ -281,7 +284,8 @@ public class TransportRequestUploadFileTest extends BasePiperTest {
developmentInstance: '001',
developmentClient: '002',
applicationDescription: 'Lorem ipsum',
abapPackage:'XYZ'
abapPackage:'XYZ',
codePage: 'UTF-9',
]
}
@ -303,13 +307,15 @@ public class TransportRequestUploadFileTest extends BasePiperTest {
String developmentInstance,
String developmentClient,
String applicationDescription,
String abapPackage) {
String abapPackage,
String codePage) {
throw new ChangeManagementException('upload failed')
}
}
stepRule.step.transportRequestUploadFile(script: nullScript,
applicationUrl: 'http://example.org/blobstore/xyz.zip',
codePage: 'UTF-9',
transportRequestId: '123456',
changeManagement: [
type: 'RFC',

View File

@ -284,7 +284,8 @@ public void testGetCommandLineWithCMClientOpts() {
'01', //developmentInstance
'00', // developmentClient
'Lorem ipsum', // applicationDescription
'XYZ' // abapPackage
'XYZ', // abapPackage
'UTF-9', //codePage
)
@ -302,6 +303,7 @@ public void testGetCommandLineWithCMClientOpts() {
ABAP_DEVELOPMENT_SERVER: 'https://example.org/rfc',
ABAP_DEVELOPMENT_USER: 'user',
ABAP_DEVELOPMENT_PASSWORD: 'password',
CODE_PAGE: 'UTF-9',
]
assertThat(script.shell, contains('cts uploadToABAP:002'))
@ -325,7 +327,8 @@ public void testGetCommandLineWithCMClientOpts() {
'01', //developmentInstance
'00', // developmentClient
'Lorem ipsum', // applicationDescription
'XYZ' // abapPackage
'XYZ', // abapPackage
'UTF-9', // codePage
)
}

View File

@ -25,6 +25,7 @@ import static com.sap.piper.cm.StepHelpers.getBackendTypeAndLogInfoIfCMIntegrati
'applicationId', // SOLMAN
'applicationDescription',
'abapPackage',
'codePage', //RFC
])
@Field Set PARAMETER_KEYS = STEP_CONFIG_KEYS.plus([
@ -66,6 +67,7 @@ void call(parameters = [:]) {
.withMandatoryProperty('changeManagement/git/format')
.withMandatoryProperty('filePath', null, { backendType in [BackendType.SOLMAN, BackendType.CTS] })
.withMandatoryProperty('applicationUrl', null, { backendType == BackendType.RFC })
.withMandatoryProperty('codePage', null, { backendType == BackendType.RFC })
.withMandatoryProperty('changeManagement/rfc/developmentInstance', null, { backendType == BackendType.RFC })
.withMandatoryProperty('changeManagement/rfc/developmentClient', null, { backendType == BackendType.RFC })
.withMandatoryProperty('changeManagement/rfc/docker/image', null, {backendType == BackendType.RFC})
@ -150,7 +152,8 @@ void call(parameters = [:]) {
configuration.changeManagement.rfc.developmentInstance,
configuration.changeManagement.rfc.developmentClient,
configuration.applicationDescription,
configuration.abapPackage)
configuration.abapPackage,
configuration.codePage)
break
}