diff --git a/src/backend/ci/core/quality/biz-quality/src/main/kotlin/com/tencent/devops/quality/service/v2/QualityRuleCheckService.kt b/src/backend/ci/core/quality/biz-quality/src/main/kotlin/com/tencent/devops/quality/service/v2/QualityRuleCheckService.kt index 7daa00e23fc..ab2838bbb2c 100644 --- a/src/backend/ci/core/quality/biz-quality/src/main/kotlin/com/tencent/devops/quality/service/v2/QualityRuleCheckService.kt +++ b/src/backend/ci/core/quality/biz-quality/src/main/kotlin/com/tencent/devops/quality/service/v2/QualityRuleCheckService.kt @@ -658,7 +658,8 @@ class QualityRuleCheckService @Autowired constructor( private fun getDetailMsg(record: QualityRuleInterceptRecord, params: Map): String { // codecc跳到独立入口页面 - return if (CodeccUtils.isCodeccAtom(record.indicatorType)) { + return if (CodeccUtils.isCodeccAtom(record.indicatorType) || + CodeccUtils.isCodeccCommunityAtom(record.indicatorType)) { val projectId = params["projectId"] ?: "" val pipelineId = params["pipelineId"] ?: "" val buildId = params["buildId"] ?: "" diff --git a/support-files/sql/5001_ci_quality-init_dml_mysql.sql b/support-files/sql/5001_ci_quality-init_dml_mysql.sql index 0b8a98a517c..0612e2d8d98 100644 --- a/support-files/sql/5001_ci_quality-init_dml_mysql.sql +++ b/support-files/sql/5001_ci_quality-init_dml_mysql.sql @@ -188,20 +188,32 @@ INSERT IGNORE INTO `T_QUALITY_METADATA` (`ID`, `DATA_ID`, `DATA_NAME`, `ELEMENT_ -- 创建模板 -INSERT IGNORE INTO `T_QUALITY_RULE_TEMPLATE` (`ID`, `NAME`, `TYPE`, `DESC`, `STAGE`, `CONTROL_POINT`, `CONTROL_POINT_POSITION`, `CREATE_USER`, `UPDATE_USER`, `CREATE_TIME`, `UPDATE_TIME`, `ENABLE`) values('2','日常构建','TEMPLATE','用于控制日常构建的告警数','开发','linuxPaasCodeCCScript','AFTER','admin','admin','2019-04-10 10:56:57','2019-04-10 11:03:51',b'1'); -INSERT IGNORE INTO `T_QUALITY_RULE_TEMPLATE` (`ID`, `NAME`, `TYPE`, `DESC`, `STAGE`, `CONTROL_POINT`, `CONTROL_POINT_POSITION`, `CREATE_USER`, `UPDATE_USER`, `CREATE_TIME`, `UPDATE_TIME`, `ENABLE`) values('3','版本转测','TEMPLATE','用于版本转测时的质量控制','部署测试环境','jobDevOpsFastPushFile','BEFORE','admin','admin','2019-04-10 10:58:12','2019-04-10 11:03:52',b'1'); -INSERT IGNORE INTO `T_QUALITY_RULE_TEMPLATE` (`ID`, `NAME`, `TYPE`, `DESC`, `STAGE`, `CONTROL_POINT`, `CONTROL_POINT_POSITION`, `CREATE_USER`, `UPDATE_USER`, `CREATE_TIME`, `UPDATE_TIME`, `ENABLE`) values('4','发布上线','TEMPLATE','用于发布版本时的质量控制','部署正式环境','cosCdnDistribution','BEFORE','admin','admin','2019-04-10 11:01:34','2019-04-10 11:43:06',b'1'); +REPLACE INTO `T_QUALITY_RULE_TEMPLATE` (`ID`, `NAME`, `TYPE`, `DESC`, `STAGE`, `CONTROL_POINT`, `CONTROL_POINT_POSITION`, `CREATE_USER`, `UPDATE_USER`, `CREATE_TIME`, `UPDATE_TIME`, `ENABLE`) values('2','日常构建','TEMPLATE','用于控制日常构建的告警数','开发','CodeCCCheckAtom','AFTER','admin','admin','2019-04-10 10:56:57','2019-04-10 11:03:51',b'1'); +REPLACE INTO `T_QUALITY_RULE_TEMPLATE` (`ID`, `NAME`, `TYPE`, `DESC`, `STAGE`, `CONTROL_POINT`, `CONTROL_POINT_POSITION`, `CREATE_USER`, `UPDATE_USER`, `CREATE_TIME`, `UPDATE_TIME`, `ENABLE`) values('3','版本转测','TEMPLATE','用于版本转测时的质量控制','部署测试环境','CodeCCCheckAtom','AFTER','admin','admin','2019-04-10 10:58:12','2019-04-10 11:03:52',b'1'); +REPLACE INTO `T_QUALITY_RULE_TEMPLATE` (`ID`, `NAME`, `TYPE`, `DESC`, `STAGE`, `CONTROL_POINT`, `CONTROL_POINT_POSITION`, `CREATE_USER`, `UPDATE_USER`, `CREATE_TIME`, `UPDATE_TIME`, `ENABLE`) values('4','发布上线','TEMPLATE','用于发布版本时的质量控制','部署正式环境','CodeCCCheckAtom','AFTER','admin','admin','2019-04-10 11:01:34','2019-04-10 11:43:06',b'1'); REPLACE INTO `T_QUALITY_RULE_TEMPLATE` (`ID`, `NAME`, `TYPE`, `DESC`, `STAGE`, `CONTROL_POINT`, `CONTROL_POINT_POSITION`, `CREATE_USER`, `UPDATE_USER`, `CREATE_TIME`, `UPDATE_TIME`, `ENABLE`) values('5','安全相关','INDICATOR_SET','包含Coverity安全规则包和敏感信息告警',NULL,NULL,NULL,'admin','admin','2019-04-10 11:42:27','2019-04-10 11:42:33',''); INSERT IGNORE INTO `T_QUALITY_RULE_TEMPLATE` (`ID`, `NAME`, `TYPE`, `DESC`, `STAGE`, `CONTROL_POINT`, `CONTROL_POINT_POSITION`, `CREATE_USER`, `UPDATE_USER`, `CREATE_TIME`, `UPDATE_TIME`, `ENABLE`) values('6','Java工具规范','INDICATOR_SET','CheckStyle工具规范',NULL,NULL,NULL,'admin','admin','2019-04-10 11:01:34','2019-04-10 11:43:06',b'1'); -INSERT IGNORE INTO `T_QUALITY_TEMPLATE_INDICATOR_MAP` (`ID`, `TEMPLATE_ID`, `INDICATOR_ID`, `OPERATION`, `THRESHOLD`) values('15','2','1011','LE','0'); -INSERT IGNORE INTO `T_QUALITY_TEMPLATE_INDICATOR_MAP` (`ID`, `TEMPLATE_ID`, `INDICATOR_ID`, `OPERATION`, `THRESHOLD`) values('16','3','1011','LE','0'); -INSERT IGNORE INTO `T_QUALITY_TEMPLATE_INDICATOR_MAP` (`ID`, `TEMPLATE_ID`, `INDICATOR_ID`, `OPERATION`, `THRESHOLD`) values('17','3','1015','LE','0'); -INSERT IGNORE INTO `T_QUALITY_TEMPLATE_INDICATOR_MAP` (`ID`, `TEMPLATE_ID`, `INDICATOR_ID`, `OPERATION`, `THRESHOLD`) values('42','5','1048','LE','0'); -INSERT IGNORE INTO `T_QUALITY_TEMPLATE_INDICATOR_MAP` (`ID`, `TEMPLATE_ID`, `INDICATOR_ID`, `OPERATION`, `THRESHOLD`) values('43','5','1009','LE','0'); -INSERT IGNORE INTO `T_QUALITY_TEMPLATE_INDICATOR_MAP` (`ID`, `TEMPLATE_ID`, `INDICATOR_ID`, `OPERATION`, `THRESHOLD`) values('44','4','1009','LE','0'); -INSERT IGNORE INTO `T_QUALITY_TEMPLATE_INDICATOR_MAP` (`ID`, `TEMPLATE_ID`, `INDICATOR_ID`, `OPERATION`, `THRESHOLD`) values('45','4','1015','LE','0'); -INSERT IGNORE INTO `T_QUALITY_TEMPLATE_INDICATOR_MAP` (`ID`, `TEMPLATE_ID`, `INDICATOR_ID`, `OPERATION`, `THRESHOLD`) values('46','4','1011','LE','0'); +REPLACE INTO `T_QUALITY_TEMPLATE_INDICATOR_MAP` (`ID`, `TEMPLATE_ID`, `INDICATOR_ID`, `OPERATION`, `THRESHOLD`) values('15','2','1016','LE','0'); +REPLACE INTO `T_QUALITY_TEMPLATE_INDICATOR_MAP` (`ID`, `TEMPLATE_ID`, `INDICATOR_ID`, `OPERATION`, `THRESHOLD`) values('16','2','1027','LE','0'); +REPLACE INTO `T_QUALITY_TEMPLATE_INDICATOR_MAP` (`ID`, `TEMPLATE_ID`, `INDICATOR_ID`, `OPERATION`, `THRESHOLD`) values('17','2','1029','LE','0'); +REPLACE INTO `T_QUALITY_TEMPLATE_INDICATOR_MAP` (`ID`, `TEMPLATE_ID`, `INDICATOR_ID`, `OPERATION`, `THRESHOLD`) values('42','2','1030','LE','0'); +REPLACE INTO `T_QUALITY_TEMPLATE_INDICATOR_MAP` (`ID`, `TEMPLATE_ID`, `INDICATOR_ID`, `OPERATION`, `THRESHOLD`) values('43','2','1031','LE','0'); +REPLACE INTO `T_QUALITY_TEMPLATE_INDICATOR_MAP` (`ID`, `TEMPLATE_ID`, `INDICATOR_ID`, `OPERATION`, `THRESHOLD`) values('44','3','1016','LE','0'); +REPLACE INTO `T_QUALITY_TEMPLATE_INDICATOR_MAP` (`ID`, `TEMPLATE_ID`, `INDICATOR_ID`, `OPERATION`, `THRESHOLD`) values('45','3','1027','LE','0'); +REPLACE INTO `T_QUALITY_TEMPLATE_INDICATOR_MAP` (`ID`, `TEMPLATE_ID`, `INDICATOR_ID`, `OPERATION`, `THRESHOLD`) values('46','3','1029','LE','0'); INSERT IGNORE INTO `T_QUALITY_TEMPLATE_INDICATOR_MAP` (`ID`, `TEMPLATE_ID`, `INDICATOR_ID`, `OPERATION`, `THRESHOLD`) values('47','6','1034','LE','0'); -INSERT IGNORE INTO `T_QUALITY_TEMPLATE_INDICATOR_MAP` (`ID`, `TEMPLATE_ID`, `INDICATOR_ID`, `OPERATION`, `THRESHOLD`) values('48','6','1036','LE','10'); \ No newline at end of file +INSERT IGNORE INTO `T_QUALITY_TEMPLATE_INDICATOR_MAP` (`ID`, `TEMPLATE_ID`, `INDICATOR_ID`, `OPERATION`, `THRESHOLD`) values('48','6','1036','LE','10'); +INSERT IGNORE INTO `T_QUALITY_TEMPLATE_INDICATOR_MAP` (`ID`, `TEMPLATE_ID`, `INDICATOR_ID`, `OPERATION`, `THRESHOLD`) values('49','3','1030','LE','0'); +INSERT IGNORE INTO `T_QUALITY_TEMPLATE_INDICATOR_MAP` (`ID`, `TEMPLATE_ID`, `INDICATOR_ID`, `OPERATION`, `THRESHOLD`) values('50','3','1031','LE','0'); +INSERT IGNORE INTO `T_QUALITY_TEMPLATE_INDICATOR_MAP` (`ID`, `TEMPLATE_ID`, `INDICATOR_ID`, `OPERATION`, `THRESHOLD`) values('51','4','1016','LE','0'); +INSERT IGNORE INTO `T_QUALITY_TEMPLATE_INDICATOR_MAP` (`ID`, `TEMPLATE_ID`, `INDICATOR_ID`, `OPERATION`, `THRESHOLD`) values('52','4','1027','LE','0'); +INSERT IGNORE INTO `T_QUALITY_TEMPLATE_INDICATOR_MAP` (`ID`, `TEMPLATE_ID`, `INDICATOR_ID`, `OPERATION`, `THRESHOLD`) values('53','4','1029','LE','0'); +INSERT IGNORE INTO `T_QUALITY_TEMPLATE_INDICATOR_MAP` (`ID`, `TEMPLATE_ID`, `INDICATOR_ID`, `OPERATION`, `THRESHOLD`) values('54','4','1030','LE','0'); +INSERT IGNORE INTO `T_QUALITY_TEMPLATE_INDICATOR_MAP` (`ID`, `TEMPLATE_ID`, `INDICATOR_ID`, `OPERATION`, `THRESHOLD`) values('55','4','1031','LE','0'); +INSERT IGNORE INTO `T_QUALITY_TEMPLATE_INDICATOR_MAP` (`ID`, `TEMPLATE_ID`, `INDICATOR_ID`, `OPERATION`, `THRESHOLD`) values('56','5','1016','LE','0'); +INSERT IGNORE INTO `T_QUALITY_TEMPLATE_INDICATOR_MAP` (`ID`, `TEMPLATE_ID`, `INDICATOR_ID`, `OPERATION`, `THRESHOLD`) values('57','5','1027','LE','0'); +INSERT IGNORE INTO `T_QUALITY_TEMPLATE_INDICATOR_MAP` (`ID`, `TEMPLATE_ID`, `INDICATOR_ID`, `OPERATION`, `THRESHOLD`) values('58','5','1029','LE','0'); +INSERT IGNORE INTO `T_QUALITY_TEMPLATE_INDICATOR_MAP` (`ID`, `TEMPLATE_ID`, `INDICATOR_ID`, `OPERATION`, `THRESHOLD`) values('59','5','1030','LE','0'); +INSERT IGNORE INTO `T_QUALITY_TEMPLATE_INDICATOR_MAP` (`ID`, `TEMPLATE_ID`, `INDICATOR_ID`, `OPERATION`, `THRESHOLD`) values('60','5','1031','LE','0'); \ No newline at end of file