aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--vars/utils.groovy13
1 files changed, 6 insertions, 7 deletions
diff --git a/vars/utils.groovy b/vars/utils.groovy
index 50d17df..d6ee25c 100644
--- a/vars/utils.groovy
+++ b/vars/utils.groovy
@@ -229,18 +229,17 @@ def test_summary_notify(single_issue) {
// Test for type of list object and parse attributes accordingly.
def run(configs, concurrent = true) {
- // Split off any JobConfig object, leaving the config objects.
- def ljobconfig = new JobConfig() // Set default values.
+ // Create JobConfig with default values.
+ def ljobconfig = new JobConfig()
+
+ def tasks = [:]
configs.eachWithIndex { config, index ->
+
+ // Extract a JobConfig object if one is found.
if (config.getClass() == JobConfig) {
ljobconfig = config
- configs.remove(configs.indexOf(config))
return // effectively a 'continue' from within a closure.
}
- }
-
- def tasks = [:]
- configs.eachWithIndex { config, index ->
def BuildConfig myconfig = new BuildConfig() // MUST be inside eachWith loop.
myconfig = SerializationUtils.clone(config)