Skip to content

Commit

Permalink
feat: 红线支持指定到具体的步骤插件 TencentBlueKing#5405. 流水线相同插件的红线产出结果保留最后一次
Browse files Browse the repository at this point in the history
  • Loading branch information
JamiKX1 committed Nov 16, 2021
1 parent cc7b720 commit 84213d4
Showing 1 changed file with 7 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -425,17 +425,20 @@ class QualityRuleCheckService @Autowired constructor(

logger.info("QUALITY|metadataList is|$metadataList")

metadataList.forEach {
metadataList.forEach { metadata ->
if (!ruleTaskSteps.isNullOrEmpty()) {
ruleTaskSteps.forEach { ruleTask ->
if ((ruleTask.indicatorEnName == it.enName) && it.taskName.startsWith(ruleTask.taskName ?: "")) {
checkMetaList.add(it)
if ((ruleTask.indicatorEnName == metadata.enName) &&
metadata.taskName.startsWith(ruleTask.taskName ?: "")) {
checkMetaList.add(metadata)
}
}
} else {
checkMetaList.add(it)
checkMetaList.removeIf { it.enName == metadata.enName && it.elementType == metadata.elementType }
checkMetaList.add(metadata)
}
}

val metadataMap = checkMetaList.map { it.enName to it }.toMap()

logger.info("QUALITY|checkMetaList is|$checkMetaList, metadataMap is|$metadataMap")
Expand Down

0 comments on commit 84213d4

Please sign in to comment.