I reduced your DSL script, so that it's self-contained and still reproduces your problem:

job(type: Multijob) {
    steps {
        phase ('Build', 'COMPLETED') {
            (1..3).each { int number ->
                job("project-$number") {
                    prop('FOO', 'BAR')
                }
            }
        }
    }
}

The problem is that the closure argument to each (or in your case splitEachLine) uses the default closure resolve strategy of OWNER_FIRST. This resolve strategy tells Groovy to call the top-level job method instead of the one from the multi-job phase context.

You can fix that by calling delegate.job(...) which will use the job method from the multi-job phase context:

job(type: Multijob) {
    steps {
        phase ('Build', 'COMPLETED') {
            (1..3).each { int number ->
                delegate.job("project-$number") {
                    prop('FOO', 'BAR')
                }
            }
        }
    }
}
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
For more information on JIRA, see: http://www.atlassian.com/software/jira

--
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to