mirror of
https://github.com/SAP/jenkins-library.git
synced 2024-12-12 10:55:20 +02:00
NotSerializableException next part (#1262)
* Update dockerExecute.groovy * Update dockerExecute.groovy * Update dockerExecute.groovy
This commit is contained in:
parent
4aeb9517a6
commit
c645087517
@ -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user