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:
|
transportRequestCreate:
|
||||||
developmentSystemId: null
|
developmentSystemId: null
|
||||||
transportRequestUploadFile:
|
transportRequestUploadFile:
|
||||||
|
failOnWarning: true
|
||||||
transportRequestRelease:
|
transportRequestRelease:
|
||||||
uiVeri5ExecuteTests:
|
uiVeri5ExecuteTests:
|
||||||
failOnError: false
|
failOnError: false
|
||||||
|
@ -206,7 +206,8 @@ public class ChangeManagement implements Serializable {
|
|||||||
String applicationDescription,
|
String applicationDescription,
|
||||||
String abapPackage,
|
String abapPackage,
|
||||||
String codePage,
|
String codePage,
|
||||||
boolean acceptUnixStyleEndOfLine) {
|
boolean acceptUnixStyleEndOfLine,
|
||||||
|
boolean failOnWarning) {
|
||||||
|
|
||||||
def args = [
|
def args = [
|
||||||
ABAP_DEVELOPMENT_INSTANCE: developmentInstance,
|
ABAP_DEVELOPMENT_INSTANCE: developmentInstance,
|
||||||
@ -217,6 +218,7 @@ public class ChangeManagement implements Serializable {
|
|||||||
ZIP_FILE_URL: filePath,
|
ZIP_FILE_URL: filePath,
|
||||||
CODE_PAGE: codePage,
|
CODE_PAGE: codePage,
|
||||||
ABAP_ACCEPT_UNIX_STYLE_EOL: acceptUnixStyleEndOfLine ? 'X' : '-',
|
ABAP_ACCEPT_UNIX_STYLE_EOL: acceptUnixStyleEndOfLine ? 'X' : '-',
|
||||||
|
FAIL_UPLOAD_ON_WARNING: Boolean.toString(failOnWarning),
|
||||||
]
|
]
|
||||||
|
|
||||||
int rc = executeWithCredentials(
|
int rc = executeWithCredentials(
|
||||||
|
@ -161,8 +161,7 @@ public class TransportRequestCreateTest extends BasePiperTest {
|
|||||||
String description,
|
String description,
|
||||||
String endpoint,
|
String endpoint,
|
||||||
String credentialsId,
|
String credentialsId,
|
||||||
String clientOpts
|
String clientOpts) {
|
||||||
) {
|
|
||||||
result.transportType = transportType
|
result.transportType = transportType
|
||||||
result.targetSystemId = targetSystemId
|
result.targetSystemId = targetSystemId
|
||||||
result.description = description
|
result.description = description
|
||||||
|
@ -236,7 +236,8 @@ public class TransportRequestUploadFileTest extends BasePiperTest {
|
|||||||
String applicationDescription,
|
String applicationDescription,
|
||||||
String abapPackage,
|
String abapPackage,
|
||||||
String codePage,
|
String codePage,
|
||||||
boolean acceptUnixStyleLineEndings) {
|
boolean acceptUnixStyleLineEndings,
|
||||||
|
boolean failUploadOnWarning) {
|
||||||
|
|
||||||
cmUtilsReceivedParams = [
|
cmUtilsReceivedParams = [
|
||||||
docker: docker,
|
docker: docker,
|
||||||
@ -250,7 +251,9 @@ public class TransportRequestUploadFileTest extends BasePiperTest {
|
|||||||
applicationDescription: applicationDescription,
|
applicationDescription: applicationDescription,
|
||||||
abapPackage: abapPackage,
|
abapPackage: abapPackage,
|
||||||
codePage: codePage,
|
codePage: codePage,
|
||||||
acceptUnixStyleLineEndings: acceptUnixStyleLineEndings]
|
acceptUnixStyleLineEndings: acceptUnixStyleLineEndings,
|
||||||
|
failUploadOnWarning: failUploadOnWarning,
|
||||||
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -290,6 +293,7 @@ public class TransportRequestUploadFileTest extends BasePiperTest {
|
|||||||
abapPackage:'XYZ',
|
abapPackage:'XYZ',
|
||||||
codePage: 'UTF-9',
|
codePage: 'UTF-9',
|
||||||
acceptUnixStyleLineEndings: true,
|
acceptUnixStyleLineEndings: true,
|
||||||
|
failUploadOnWarning: true,
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -313,7 +317,8 @@ public class TransportRequestUploadFileTest extends BasePiperTest {
|
|||||||
String applicationDescription,
|
String applicationDescription,
|
||||||
String abapPackage,
|
String abapPackage,
|
||||||
String codePage,
|
String codePage,
|
||||||
boolean acceptUnixStyleLineEndings) {
|
boolean acceptUnixStyleLineEndings,
|
||||||
|
boolean failOnUploadWarning) {
|
||||||
throw new ChangeManagementException('upload failed')
|
throw new ChangeManagementException('upload failed')
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -287,6 +287,7 @@ public void testGetCommandLineWithCMClientOpts() {
|
|||||||
'XYZ', // abapPackage
|
'XYZ', // abapPackage
|
||||||
'UTF-9', //codePage
|
'UTF-9', //codePage
|
||||||
true, // accept unix style EOL
|
true, // accept unix style EOL
|
||||||
|
true, //failUploadOnWarning
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
@ -306,6 +307,7 @@ public void testGetCommandLineWithCMClientOpts() {
|
|||||||
ABAP_DEVELOPMENT_PASSWORD: 'password',
|
ABAP_DEVELOPMENT_PASSWORD: 'password',
|
||||||
CODE_PAGE: 'UTF-9',
|
CODE_PAGE: 'UTF-9',
|
||||||
ABAP_ACCEPT_UNIX_STYLE_EOL: 'X',
|
ABAP_ACCEPT_UNIX_STYLE_EOL: 'X',
|
||||||
|
FAIL_UPLOAD_ON_WARNING: 'true',
|
||||||
]
|
]
|
||||||
|
|
||||||
assertThat(script.shell, contains('cts uploadToABAP:002'))
|
assertThat(script.shell, contains('cts uploadToABAP:002'))
|
||||||
@ -332,6 +334,7 @@ public void testGetCommandLineWithCMClientOpts() {
|
|||||||
'XYZ', // abapPackage
|
'XYZ', // abapPackage
|
||||||
'UTF-9', // codePage
|
'UTF-9', // codePage
|
||||||
true, // accept unix style EOL
|
true, // accept unix style EOL
|
||||||
|
true, // failUploadOnWarning
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -80,6 +80,7 @@ void call(parameters = [:]) {
|
|||||||
.withMandatoryProperty('abapPackage', null, { backendType == BackendType.RFC })
|
.withMandatoryProperty('abapPackage', null, { backendType == BackendType.RFC })
|
||||||
.withMandatoryProperty('applicationId', null, {backendType == BackendType.SOLMAN})
|
.withMandatoryProperty('applicationId', null, {backendType == BackendType.SOLMAN})
|
||||||
.withMandatoryProperty('applicationName', null, {backendType == BackendType.RFC})
|
.withMandatoryProperty('applicationName', null, {backendType == BackendType.RFC})
|
||||||
|
.withMandatoryProperty('failOnWarning', null, {backendType == BackendType.RFC})
|
||||||
|
|
||||||
new Utils().pushToSWA([
|
new Utils().pushToSWA([
|
||||||
step: STEP_NAME,
|
step: STEP_NAME,
|
||||||
@ -156,7 +157,10 @@ void call(parameters = [:]) {
|
|||||||
configuration.applicationDescription,
|
configuration.applicationDescription,
|
||||||
configuration.abapPackage,
|
configuration.abapPackage,
|
||||||
configuration.codePage,
|
configuration.codePage,
|
||||||
configuration.acceptUnixStyleLineEndings)
|
configuration.acceptUnixStyleLineEndings,
|
||||||
|
configuration.failOnWarning,
|
||||||
|
)
|
||||||
|
|
||||||
break
|
break
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user