def call(body) { def config = [:] body.resolveStrategy = Closure.DELEGATE_FIRST body.delegate = config body () def reposConfig = [:] config.reposConfig.each{repo -> reposConfig[repo.key] = { String gitBranch = repo.value.gitBranch, String gitRepo = repo.value.gitRepo, String gitCreds = repo.value.gitCreds } } reposConfig.each{repo -> echo "Map Element ${repo.key}: ${repo.value.gitRepo}" } }