try to set default value?

This commit is contained in:
Hyatt 2022-03-04 09:46:12 -06:00
parent 6f8454182d
commit 1e30925781
Signed by: nhyatt
GPG Key ID: C50D0BBB5BC40BEA

View File

@ -4,7 +4,7 @@ def call(body) {
body.delegate = config body.delegate = config
body () body ()
def reposConfig = [:] /* def reposConfig = [:]
config.reposConfig.each{repo -> config.reposConfig.each{repo ->
reposConfig[repo.key] = [ reposConfig[repo.key] = [
gitBranch: repo.value.gitBranch, gitBranch: repo.value.gitBranch,
@ -13,7 +13,9 @@ def call(body) {
testValue: repo.value?.testValue ?: "default" testValue: repo.value?.testValue ?: "default"
] ]
} }
*/
def reposConfig = config.reposConfig ?: [:]
reposConfig.each{repo -> reposConfig.each{repo ->
echo "Map Element ${repo.key}: ${repo.value.gitRepo} = ${repo.value.testValue}" echo "Map Element ${repo.key}: ${repo.value.gitRepo} = ${repo.value.testValue}"
} }