1
0
mirror of https://github.com/SAP/jenkins-library.git synced 2024-12-12 10:55:20 +02:00

Support additional volume mounts for cm related steps (#2287)

* Fix asserts

* support additional volume mounts for cm related steps
This commit is contained in:
Marcus Holl 2020-11-13 13:45:30 +01:00 committed by GitHub
parent 83daa33e65
commit 3e3a29ffd2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 5 deletions

View File

@ -432,7 +432,8 @@ public class ChangeManagement implements Serializable {
dockerImage: docker.image,
dockerOptions: docker.options,
dockerEnvVars: dockerEnvVars,
dockerPullImage: docker.pullImage) {
dockerPullImage: docker.pullImage,
dockerVolumeBind: docker.volumeBind ?: [:]) {
result = script.sh(shArgs)

View File

@ -277,7 +277,8 @@ public void testGetCommandLineWithCMClientOpts() {
new ChangeManagement(nullScript).uploadFileToTransportRequestSOLMAN(
[
image: 'ppiper/cm-client',
imagePull: true,
pullImage: true,
volumeBind: ['/home/me/certs' : '/certs'],
],
'001',
'002',
@ -289,9 +290,9 @@ public void testGetCommandLineWithCMClientOpts() {
// 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
assert dockerExecuteRule.getDockerParams().dockerImage == 'ppiper/cm-client'
assert dockerExecuteRule.getDockerParams().dockerPullImage
assert dockerExecuteRule.getDockerParams().dockerVolumeBind == ['/home/me/certs' : '/certs']
}
@Test