mirror of
https://github.com/SAP/jenkins-library.git
synced 2024-12-12 10:55:20 +02:00
Provide flag failUploadOnWarning
in order to be able to survive uploads which are basically successful, but with warning(s).
This commit is contained in:
parent
0ea6bdc05c
commit
a375cc75a5
@ -363,6 +363,7 @@ steps:
|
||||
transportRequestCreate:
|
||||
developmentSystemId: null
|
||||
transportRequestUploadFile:
|
||||
failOnWarning: true
|
||||
transportRequestRelease:
|
||||
uiVeri5ExecuteTests:
|
||||
failOnError: false
|
||||
|
@ -206,7 +206,8 @@ public class ChangeManagement implements Serializable {
|
||||
String applicationDescription,
|
||||
String abapPackage,
|
||||
String codePage,
|
||||
boolean acceptUnixStyleEndOfLine) {
|
||||
boolean acceptUnixStyleEndOfLine,
|
||||
boolean failOnWarning) {
|
||||
|
||||
def args = [
|
||||
ABAP_DEVELOPMENT_INSTANCE: developmentInstance,
|
||||
@ -217,6 +218,7 @@ public class ChangeManagement implements Serializable {
|
||||
ZIP_FILE_URL: filePath,
|
||||
CODE_PAGE: codePage,
|
||||
ABAP_ACCEPT_UNIX_STYLE_EOL: acceptUnixStyleEndOfLine ? 'X' : '-',
|
||||
FAIL_UPLOAD_ON_WARNING: Boolean.toString(failOnWarning),
|
||||
]
|
||||
|
||||
int rc = executeWithCredentials(
|
||||
|
@ -161,8 +161,7 @@ public class TransportRequestCreateTest extends BasePiperTest {
|
||||
String description,
|
||||
String endpoint,
|
||||
String credentialsId,
|
||||
String clientOpts
|
||||
) {
|
||||
String clientOpts) {
|
||||
result.transportType = transportType
|
||||
result.targetSystemId = targetSystemId
|
||||
result.description = description
|
||||
|
@ -236,7 +236,8 @@ public class TransportRequestUploadFileTest extends BasePiperTest {
|
||||
String applicationDescription,
|
||||
String abapPackage,
|
||||
String codePage,
|
||||
boolean acceptUnixStyleLineEndings) {
|
||||
boolean acceptUnixStyleLineEndings,
|
||||
boolean failUploadOnWarning) {
|
||||
|
||||
cmUtilsReceivedParams = [
|
||||
docker: docker,
|
||||
@ -250,7 +251,9 @@ public class TransportRequestUploadFileTest extends BasePiperTest {
|
||||
applicationDescription: applicationDescription,
|
||||
abapPackage: abapPackage,
|
||||
codePage: codePage,
|
||||
acceptUnixStyleLineEndings: acceptUnixStyleLineEndings]
|
||||
acceptUnixStyleLineEndings: acceptUnixStyleLineEndings,
|
||||
failUploadOnWarning: failUploadOnWarning,
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
@ -290,6 +293,7 @@ public class TransportRequestUploadFileTest extends BasePiperTest {
|
||||
abapPackage:'XYZ',
|
||||
codePage: 'UTF-9',
|
||||
acceptUnixStyleLineEndings: true,
|
||||
failUploadOnWarning: true,
|
||||
]
|
||||
}
|
||||
|
||||
@ -313,7 +317,8 @@ public class TransportRequestUploadFileTest extends BasePiperTest {
|
||||
String applicationDescription,
|
||||
String abapPackage,
|
||||
String codePage,
|
||||
boolean acceptUnixStyleLineEndings) {
|
||||
boolean acceptUnixStyleLineEndings,
|
||||
boolean failOnUploadWarning) {
|
||||
throw new ChangeManagementException('upload failed')
|
||||
}
|
||||
}
|
||||
|
@ -287,6 +287,7 @@ public void testGetCommandLineWithCMClientOpts() {
|
||||
'XYZ', // abapPackage
|
||||
'UTF-9', //codePage
|
||||
true, // accept unix style EOL
|
||||
true, //failUploadOnWarning
|
||||
)
|
||||
|
||||
|
||||
@ -306,6 +307,7 @@ public void testGetCommandLineWithCMClientOpts() {
|
||||
ABAP_DEVELOPMENT_PASSWORD: 'password',
|
||||
CODE_PAGE: 'UTF-9',
|
||||
ABAP_ACCEPT_UNIX_STYLE_EOL: 'X',
|
||||
FAIL_UPLOAD_ON_WARNING: 'true',
|
||||
]
|
||||
|
||||
assertThat(script.shell, contains('cts uploadToABAP:002'))
|
||||
@ -332,6 +334,7 @@ public void testGetCommandLineWithCMClientOpts() {
|
||||
'XYZ', // abapPackage
|
||||
'UTF-9', // codePage
|
||||
true, // accept unix style EOL
|
||||
true, // failUploadOnWarning
|
||||
)
|
||||
}
|
||||
|
||||
|
@ -80,6 +80,7 @@ void call(parameters = [:]) {
|
||||
.withMandatoryProperty('abapPackage', null, { backendType == BackendType.RFC })
|
||||
.withMandatoryProperty('applicationId', null, {backendType == BackendType.SOLMAN})
|
||||
.withMandatoryProperty('applicationName', null, {backendType == BackendType.RFC})
|
||||
.withMandatoryProperty('failOnWarning', null, {backendType == BackendType.RFC})
|
||||
|
||||
new Utils().pushToSWA([
|
||||
step: STEP_NAME,
|
||||
@ -156,7 +157,10 @@ void call(parameters = [:]) {
|
||||
configuration.applicationDescription,
|
||||
configuration.abapPackage,
|
||||
configuration.codePage,
|
||||
configuration.acceptUnixStyleLineEndings)
|
||||
configuration.acceptUnixStyleLineEndings,
|
||||
configuration.failOnWarning,
|
||||
)
|
||||
|
||||
break
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user