mirror of
https://github.com/SAP/jenkins-library.git
synced 2025-01-20 05:19:40 +02:00
docker for upload file SOLMAN
This commit is contained in:
parent
24cd9400d7
commit
71fdcc3e53
@ -138,6 +138,7 @@ public class ChangeManagement implements Serializable {
|
||||
}
|
||||
|
||||
void uploadFileToTransportRequestSOLMAN(
|
||||
Map docker,
|
||||
String changeId,
|
||||
String transportRequestId,
|
||||
String applicationId,
|
||||
@ -154,7 +155,7 @@ public class ChangeManagement implements Serializable {
|
||||
|
||||
int rc = executeWithCredentials(
|
||||
BackendType.SOLMAN,
|
||||
[:],
|
||||
docker,
|
||||
endpoint,
|
||||
credentialsId,
|
||||
'upload-file-to-transport',
|
||||
|
@ -130,6 +130,7 @@ public class TransportRequestUploadFileTest extends BasePiperTest {
|
||||
|
||||
ChangeManagement cm = new ChangeManagement(nullScript) {
|
||||
void uploadFileToTransportRequestSOLMAN(
|
||||
Map docker,
|
||||
String changeId,
|
||||
String transportRequestId,
|
||||
String applicationId,
|
||||
@ -371,6 +372,7 @@ public class TransportRequestUploadFileTest extends BasePiperTest {
|
||||
|
||||
ChangeManagement cm = new ChangeManagement(nullScript) {
|
||||
void uploadFileToTransportRequestSOLMAN(
|
||||
Map docker,
|
||||
String changeId,
|
||||
String transportRequestId,
|
||||
String applicationId,
|
||||
@ -379,6 +381,7 @@ public class TransportRequestUploadFileTest extends BasePiperTest {
|
||||
String credentialsId,
|
||||
String cmclientOpts) {
|
||||
|
||||
cmUtilReceivedParams.docker = docker
|
||||
cmUtilReceivedParams.changeId = changeId
|
||||
cmUtilReceivedParams.transportRequestId = transportRequestId
|
||||
cmUtilReceivedParams.applicationId = applicationId
|
||||
@ -398,6 +401,12 @@ public class TransportRequestUploadFileTest extends BasePiperTest {
|
||||
|
||||
assert cmUtilReceivedParams ==
|
||||
[
|
||||
docker: [
|
||||
image: 'ppiper/cm-client',
|
||||
pullImage: true,
|
||||
envVars: [:],
|
||||
options: [],
|
||||
],
|
||||
changeId: '001',
|
||||
transportRequestId: '002',
|
||||
applicationId: 'app',
|
||||
@ -417,6 +426,7 @@ public class TransportRequestUploadFileTest extends BasePiperTest {
|
||||
|
||||
ChangeManagement cm = new ChangeManagement(nullScript) {
|
||||
void uploadFileToTransportRequestSOLMAN(
|
||||
Map docker,
|
||||
String changeId,
|
||||
String transportRequestId,
|
||||
String applicationId,
|
||||
@ -447,6 +457,7 @@ public class TransportRequestUploadFileTest extends BasePiperTest {
|
||||
|
||||
ChangeManagement cm = new ChangeManagement(nullScript) {
|
||||
void uploadFileToTransportRequestSOLMAN(
|
||||
Map docker,
|
||||
String changeId,
|
||||
String transportRequestId,
|
||||
String applicationId,
|
||||
@ -477,6 +488,7 @@ public class TransportRequestUploadFileTest extends BasePiperTest {
|
||||
|
||||
ChangeManagement cm = new ChangeManagement(nullScript) {
|
||||
void uploadFileToTransportRequestSOLMAN(
|
||||
Map docker,
|
||||
String changeId,
|
||||
String transportRequestId,
|
||||
String applicationId,
|
||||
@ -506,6 +518,7 @@ public class TransportRequestUploadFileTest extends BasePiperTest {
|
||||
|
||||
ChangeManagement cm = new ChangeManagement(nullScript) {
|
||||
void uploadFileToTransportRequestSOLMAN(
|
||||
Map docker,
|
||||
String changeId,
|
||||
String transportRequestId,
|
||||
String applicationId,
|
||||
|
@ -262,6 +262,10 @@ public void testGetCommandLineWithCMClientOpts() {
|
||||
script.setReturnValue(JenkinsShellCallRule.Type.REGEX, 'upload-file-to-transport.*-cID 001 -tID 002 XXX "/path"', 0)
|
||||
|
||||
new ChangeManagement(nullScript).uploadFileToTransportRequestSOLMAN(
|
||||
[
|
||||
image: 'ppiper/cm-client',
|
||||
imagePull: true,
|
||||
],
|
||||
'001',
|
||||
'002',
|
||||
'XXX',
|
||||
@ -269,8 +273,12 @@ public void testGetCommandLineWithCMClientOpts() {
|
||||
'https://example.org/cm',
|
||||
'me')
|
||||
|
||||
// no assert required here, since the regex registered above to the script rule is an implicit check for
|
||||
// the command line.
|
||||
// no assert required here for the shell script, since the regex registered above
|
||||
// to the script rule is an implicit check for the command line.
|
||||
|
||||
dockerExecuteRule.getDockerParams().dockerImage = 'ppiper/cmclient'
|
||||
dockerExecuteRule.getDockerParams().dockerPullImage = true
|
||||
|
||||
}
|
||||
|
||||
@Test
|
||||
@ -376,6 +384,7 @@ public void testGetCommandLineWithCMClientOpts() {
|
||||
script.setReturnValue(JenkinsShellCallRule.Type.REGEX,, 'upload-file-to-transport', 1)
|
||||
|
||||
new ChangeManagement(nullScript).uploadFileToTransportRequestSOLMAN(
|
||||
[:],
|
||||
'001',
|
||||
'002',
|
||||
'XXX',
|
||||
|
@ -129,6 +129,7 @@ void call(parameters = [:]) {
|
||||
|
||||
case BackendType.SOLMAN:
|
||||
cm.uploadFileToTransportRequestSOLMAN(
|
||||
configuration.changeManagement.solman?.docker ?: [:],
|
||||
configuration.changeDocumentId,
|
||||
configuration.transportRequestId,
|
||||
configuration.applicationId,
|
||||
|
Loading…
x
Reference in New Issue
Block a user