feat: 优化监控Job的成功判断逻辑
All checks were successful
CI Monitor MIflow / build-image (push) Successful in 44s

This commit is contained in:
zhaoyingbo 2024-08-09 07:37:07 +00:00
parent 3471576ed7
commit d82577588b

View File

@ -20,9 +20,9 @@ const doMonitor = async (monitor: DB.Monitor): Promise<void> => {
Number(pipeline_id) Number(pipeline_id)
) )
// 是否所有Stage关联的Job都成功了 // 是否所有Stage关联的Job都成功了
const isAllSuccess = jobList.every( const isAllSuccess = jobList
(job) => job.stage === stage && job.status === "success" .filter((job) => job.stage === stage)
) .every((job) => job.status === "success")
// 没全部成功跳过 // 没全部成功跳过
if (!isAllSuccess) return if (!isAllSuccess) return
// 先删除监控 // 先删除监控