答案 0 :(得分:0)
我找到了解决方案:
Build Flow
类型This build is parameterized
。我添加了两次启动MyAnotherJobWhichIWantToRun
所需的所有参数:
0
。 可以使用Groovy脚本实现。只需写下Define build flow using flow DSL
:
ignore(ABORTED) {
ignore(FAILURE) {
// offers
b = build("MyAnotherJobWhichIWantToRun",
"config.test.timeout.min": params["offers.duration.min"],
"throughput.freight.offer.permin": params["throughput.freight.offer.permin"],
"throughput.vehicle.offer.permin": params["throughput.vehicle.offer.permin"],
"throughput.freight.search.permin": "0",
"throughput.freight.reg.search.permin": "0",
"throughput.freight.cnt.search.permin": "0",
"throughput.vehicle.search.permin": "0",
"throughput.vehicle.reg.search.permin": "0",
"throughput.vehicle.cnt.search.permin": "0"
)
}
ignore(FAILURE) {
// searches
b = build("MyAnotherJobWhichIWantToRun",
"throughput.freight.offer.permin": "0",
"throughput.vehicle.offer.permin": "0",
"config.test.timeout.min": params["searches.duration.min"],
"throughput.freight.search.permin": params["throughput.freight.search.permin"],
"throughput.freight.reg.search.permin": params["throughput.freight.reg.search.permin"],
"throughput.freight.cnt.search.permin": params["throughput.freight.cnt.search.permin"],
"throughput.vehicle.search.permin": params["throughput.vehicle.search.permin"],
"throughput.vehicle.reg.search.permin": params["throughput.vehicle.reg.search.permin"],
"throughput.vehicle.cnt.search.permin": params["throughput.vehicle.cnt.search.permin"]
)
}
}
下一个块:
ignore(ABORTED){
ignore(FAILURE) {
即使首先失败或中止,也会启动第二个作业。