diff --git a/src/com/sap/piper/cm/ChangeManagement.groovy b/src/com/sap/piper/cm/ChangeManagement.groovy index dfd20a837..0bba3d7c9 100644 --- a/src/com/sap/piper/cm/ChangeManagement.groovy +++ b/src/com/sap/piper/cm/ChangeManagement.groovy @@ -324,6 +324,7 @@ public class ChangeManagement implements Serializable { } void releaseTransportRequestSOLMAN( + Map docker, String changeId, String transportRequestId, String endpoint, @@ -340,7 +341,7 @@ public class ChangeManagement implements Serializable { int rc = executeWithCredentials( BackendType.SOLMAN, - [:], + docker, endpoint, credentialsId, cmd, diff --git a/test/groovy/TransportRequestReleaseTest.groovy b/test/groovy/TransportRequestReleaseTest.groovy index b28895926..2eb808fb4 100644 --- a/test/groovy/TransportRequestReleaseTest.groovy +++ b/test/groovy/TransportRequestReleaseTest.groovy @@ -97,6 +97,7 @@ public class TransportRequestReleaseTest extends BasePiperTest { ChangeManagement cm = new ChangeManagement(nullScript) { void releaseTransportRequestSOLMAN( + Map docker, String changeId, String transportRequestId, String endpoint, @@ -374,12 +375,14 @@ public class TransportRequestReleaseTest extends BasePiperTest { ChangeManagement cm = new ChangeManagement(nullScript) { void releaseTransportRequestSOLMAN( + Map docker, String changeId, String transportRequestId, String endpoint, String credentialsId, String clientOpts) { + receivedParams.docker = docker receivedParams.changeId = changeId receivedParams.transportRequestId = transportRequestId receivedParams.endpoint = endpoint @@ -391,6 +394,12 @@ public class TransportRequestReleaseTest extends BasePiperTest { stepRule.step.transportRequestRelease(script: nullScript, changeDocumentId: '001', transportRequestId: '002', cmUtils: cm) assert receivedParams == [ + docker: [ + image: 'ppiper/cm-client', + pullImage: true, + envVars: [:], + options: [], + ], changeId: '001', transportRequestId: '002', endpoint: 'https://example.org/cm', diff --git a/test/groovy/com/sap/piper/cm/ChangeManagementTest.groovy b/test/groovy/com/sap/piper/cm/ChangeManagementTest.groovy index 41e072301..1a1fc8c73 100644 --- a/test/groovy/com/sap/piper/cm/ChangeManagementTest.groovy +++ b/test/groovy/com/sap/piper/cm/ChangeManagementTest.groovy @@ -400,6 +400,10 @@ public void testGetCommandLineWithCMClientOpts() { script.setReturnValue(JenkinsShellCallRule.Type.REGEX, '-t SOLMAN release-transport.*-cID 001.*-tID 002', 0) new ChangeManagement(nullScript).releaseTransportRequestSOLMAN( + [ + image: 'ppiper/cm-client', + imagePull: true, + ], '001', '002', 'https://example.org', @@ -408,6 +412,9 @@ public void testGetCommandLineWithCMClientOpts() { // no assert required here, since the regex registered above to the script rule is an implicit check for // the command line. + + dockerExecuteRule.getDockerParams().dockerImage == 'ppiper/cm-client' + dockerExecuteRule.getDockerParams().pullImage == true } @Test @@ -460,6 +467,10 @@ public void testGetCommandLineWithCMClientOpts() { script.setReturnValue(JenkinsShellCallRule.Type.REGEX, 'release-transport.*-cID 001.*-tID 002', 1) new ChangeManagement(nullScript).releaseTransportRequestSOLMAN( + [ + image: 'ppiper/cm-client', + imagePull: true, + ], '001', '002', 'https://example.org', diff --git a/vars/transportRequestRelease.groovy b/vars/transportRequestRelease.groovy index 9d87b185d..b2acf002b 100644 --- a/vars/transportRequestRelease.groovy +++ b/vars/transportRequestRelease.groovy @@ -100,6 +100,7 @@ void call(parameters = [:]) { case BackendType.SOLMAN: cm.releaseTransportRequestSOLMAN( + configuration.changeManagement.solman.docker, configuration.changeDocumentId, configuration.transportRequestId, configuration.changeManagement.endpoint,