Skip to content

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: 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")
}