26 lines
648 B
Groovy
26 lines
648 B
Groovy
def call(body) {
|
|
def config = [:]
|
|
body.resolveStrategy = Closure.DELEGATE_FIRST
|
|
body.delegate = config
|
|
body ()
|
|
|
|
/*
|
|
def reposConfig = [:]
|
|
config.reposConfig.each{repo ->
|
|
reposConfig[repo.key] = [
|
|
gitBranch: repo.value.gitBranch,
|
|
gitRepo: repo.value.gitRepo,
|
|
gitCreds: repo.value.gitCreds,
|
|
testValue: repo.value?.testValue ?: "default"
|
|
]
|
|
}
|
|
*/
|
|
|
|
Map reposConfig = config.reposConfig ?: [:]
|
|
reposConfig.each{repo ->
|
|
def name = repo.key
|
|
echo "Map Element ${name}: ${repo.value.gitRepo} = ${repo.value.testValue}"
|
|
}
|
|
}
|
|
|