下面是一个有关我的脚本当前外观的示例:
// in this array we'll place the jobs that we wish to run
def branches = [:]
def params = [
"1",
"2",
"3"
]
params.each { param ->
branches[param]= {
build job: 'Job X', parameters: []
}
}
parallel branches
我将能够对每个测试运行发布操作(始终,成功,失败等)。我看到您可以做这样的事情:
def buildResult = build job: 'Job X', parameters: []
if(buildResult.getResult()=='FAILURE') {
}
但是不知道从数组运行时如何执行此操作。有什么建议吗?