我有 3 个任务需要在 3 个管道中运行,以便任务 1 和 2 并行运行。
任务 1 需要在后台静默运行(如何设置?)
任务 2 是工作人员,
任务 3 在任务 2 完成后触发。
任务 1 在后台运行,需要在任务 2 完成时终止,以便触发任务 3。(不知道如何设置。)
在这种情况下,任务 1 写入文件。如果在收到 Jenkins 的终止时正在写入文件,任务 1 的终止会导致问题吗?
对此的任何帮助将不胜感激。
node ("mach12") {
parallel(
"Monitors":{ // <-Terminate this after 'Assorted Tasks' ends.
stage("Task1"){
dir('C:\\Tasks\\StatsMonitor') {
retCode = (powershell(returnStdout: true, script: 'return Invoke-Expression -Command \" .\\myMonitor.exe ' + P1 +' \"'))
}
}
},
"Assorted Tasks" :{
stage("Task2"){
//Multiple other exe's called here.
}
}, failFast: true)
stage("Task3"){
//assorted tasks here.
}
}