1
0
mirror of https://github.com/SAP/jenkins-library.git synced 2025-01-18 05:18:24 +02:00

Avoid using Iterators to get around NotSerializableException (#1242)

* Avoid using Iterators to get around NotSerializableException

* Avoid using Iterators to get around NotSerializableException
This commit is contained in:
Sven Merk 2020-03-05 15:48:05 +01:00 committed by GitHub
parent 622d559eae
commit d29c249e35
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -423,8 +423,9 @@ private List getContainerEnvs(config, imageName) {
}
if (dockerEnvVars) {
for (String k : dockerEnvVars.keySet()) {
containerEnv << envVar(key: k, value: dockerEnvVars[k].toString())
dockerEnvVars.each {
k, v ->
containerEnv << envVar(key: k, value: v.toString())
}
}
@ -434,8 +435,9 @@ private List getContainerEnvs(config, imageName) {
// Inherit the proxy information from the master to the container
SystemEnv systemEnv = new SystemEnv()
for (String env : systemEnv.getEnv().keySet()) {
containerEnv << envVar(key: env, value: systemEnv.get(env))
systemEnv.getEnv().each {
k, v ->
containerEnv << envVar(key: k, value: v)
}
return containerEnv