@Mixin(JobSpecMixin)
class StartupShutdownWebLogicSpec extends Specification {
JobParent jobParent = createJobParent()
JobManagement jm = jobParent.getJm()
@Unroll
void 'test XML output #environment'() {
given:
File file = new File('jobs', 'StartupShutdown-WebLogic.groovy')
jm.parameters.put("ENVIRONMENT", environment)
jm.parameters.put("GROUP", "pbdel")
when:
GeneratedItems generatedItems = DslScriptLoader.runDslEngine file.text, jm
then:
generatedItems.getJobs().size() == jobCount
where:
environment << ["env1", "env3", "edu", "prv", "pre", "prod"]
jobCount << [ 3, 3, 2, 2, 3, 3]
}
}
Hi Torsten.
I think runDslEngineForParent is the way to go for that.
ScriptRequest scriptRequest = new ScriptRequest(null, file.text, new File('.').toURI().toURL())
JobParent jobParent = DslScriptLoader.runDslEngineForParent scriptRequest, jm
println jobParent.referencedJobs.size()
--
You received this message because you are subscribed to the Google Groups "job-dsl-plugin" group.
To unsubscribe from this group and stop receiving emails from it, send an email to job-dsl-plugi...@googlegroups.com.
To post to this group, send email to job-dsl...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/job-dsl-plugin/68c5cccc-61e2-4c0a-9531-ccf365ff6876%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.