Script
Purpose¶
Call and list scripts.
Methods¶
Binding name: p6.script
Method: void call(String scriptName)
Execute the named script and waits for it to complete. The current pipeline will be used by the called script.
Method: String start(String scriptName)
Submits the named script for execution and returns its job id as a String. This method DOES NOT wait for the script execution to complete.
Note
You can use the p6.job DSL to interact with the started script job using the returned job id
Method: boolean exists(String scriptName)
Checks if the given script exists.
Method: List<String> list()
Return a collection of all scripts names.
Examples¶
p6.script.list().each() {
println "${it}"
}
if(p6.script.exists("Sleeper")) {
p6.pipeline.put "id", "MyControlTest"
p6.script.call("Sleeper")
}