Skip to content

Commit

Permalink
feat:保存流水线时,校验是否有子流水线循环依赖 #10479
Browse files Browse the repository at this point in the history
  • Loading branch information
landun committed Aug 12, 2024
1 parent b4612b0 commit f28044e
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions support-files/sql/1001_ci_process_ddl_mysql.sql
Original file line number Diff line number Diff line change
Expand Up @@ -1280,4 +1280,23 @@ CREATE TABLE IF NOT EXISTS `T_PIPELINE_WEBHOOK_VERSION`
UNIQUE UNI_PROJECT_PIPELINE_TASK (`PROJECT_ID`, `PIPELINE_ID`, `VERSION`, `TASK_ID`)
) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4 COMMENT = '流水线webhook版本';

-- devops_process.T_PIPELINE_SUB_REF definition

CREATE TABLE `T_PIPELINE_SUB_REF` (
`ID` bigint(20) NOT NULL AUTO_INCREMENT,
`PROJECT_ID` varchar(64) DEFAULT NULL COMMENT '蓝盾项目ID',
`PIPELINE_ID` varchar(64) DEFAULT NULL COMMENT '蓝盾流水线ID',
`STAGE_NAME` varchar(64) DEFAULT NULL COMMENT 'STAGE名称',
`TASK_ID` varchar(64) DEFAULT NULL COMMENT 'TASKID',
`TASK_NAME` varchar(256) DEFAULT NULL COMMENT 'TASK名称',
`SUB_PROJECT_ID` varchar(64) DEFAULT NULL COMMENT '子流水线项目ID',
`SUB_PIPELINE_ID` varchar(64) DEFAULT NULL COMMENT '子流水线流水线ID',
`PIPELINE_NAME` varchar(256) DEFAULT NULL COMMENT '流水线名称',
`CHANNEL` varchar(32) DEFAULT NULL COMMENT '流水线渠道',
`CONTAINER_NAME` varchar(256) DEFAULT NULL COMMENT 'JOB名称',
`SUB_PIPELINE_NAME` varchar(256) DEFAULT NULL COMMENT '子流水线名',
PRIMARY KEY (`ID`),
UNIQUE KEY `T_SUB_PIPELINE_REF_UNIQUE` (`PROJECT_ID`,`PIPELINE_ID`,`TASK_ID`)
) ENGINE=InnoDB AUTO_INCREMENT=209 DEFAULT CHARSET=utf8mb4 COMMENT='子流水线依赖关系';

SET FOREIGN_KEY_CHECKS = 1;

0 comments on commit f28044e

Please sign in to comment.