1
0
mirror of https://github.com/SAP/jenkins-library.git synced 2024-12-14 11:03:09 +02:00

NotSerializableException next part (#1262)

* Update dockerExecute.groovy

* Update dockerExecute.groovy

* Update dockerExecute.groovy
This commit is contained in:
Sven Merk 2020-03-11 10:05:03 +01:00 committed by GitHub
parent 4aeb9517a6
commit c645087517
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -265,20 +265,20 @@ private getDockerOptions(Map dockerEnvVars, Map dockerVolumeBind, def dockerOpti
]
def options = []
if (dockerEnvVars) {
for (String k : dockerEnvVars.keySet()) {
options.add("--env ${k}=${dockerEnvVars[k].toString()}")
dockerEnvVars.each { String k, v ->
options.add("--env ${k}=${v.toString()}")
}
}
for (String envVar : specialEnvironments) {
specialEnvironments.each { String envVar ->
if (dockerEnvVars == null || !dockerEnvVars.containsKey(envVar)) {
options.add("--env ${envVar}")
}
}
if (dockerVolumeBind) {
for (String k : dockerVolumeBind.keySet()) {
options.add("--volume ${k}:${dockerVolumeBind[k].toString()}")
dockerVolumeBind.each { String k, v ->
options.add("--volume ${k}:${v.toString()}")
}
}
@ -287,7 +287,7 @@ private getDockerOptions(Map dockerEnvVars, Map dockerVolumeBind, def dockerOpti
dockerOptions = [dockerOptions]
}
if (dockerOptions instanceof List) {
for (String option : dockerOptions) {
dockerOptions.each { String option ->
options << escapeBlanks(option)
}
} else {