feat: 流水线队列引擎 — max_executors并发控制 + Jenkins风格构建队列+取消

This commit is contained in:
attacker committed 2026-06-24 05:02:43 +00:00
1 parent be9db65a22
commit 7bc5169e8f
5 files changed
+249 -4

No files matched your search

+9
View File
@@ -24,6 +24,9 @@ type Pipeline struct {
DeployMode string `gorm:"size:16;default:branch;comment:部署模式 branch/tag" json:"deploy_mode"`
DeployTarget string `gorm:"size:16;default:ssh;comment:部署目标 ssh/k8s" json:"deploy_target"`
// 并发控制
MaxExecutors int `gorm:"default:1;comment:最大并发执行数(1=串行)" json:"max_executors"`
// SSH 部署目标服务器 (JSON: [1,2,3])
ServerIDs string `gorm:"type:text;comment:SSH服务器ID列表(JSON)" json:"server_ids,omitempty"`
@@ -170,6 +173,9 @@ type CreatePipelineRequest struct {
// 缓存路径
CachePaths string `json:"cache_paths"`
// 并发控制
MaxExecutors int `json:"max_executors"`
}
// UpdatePipelineRequest 更新流水线请求
@@ -203,6 +209,9 @@ type UpdatePipelineRequest struct {
// 缓存
CachePaths string `json:"cache_paths"`
Enabled *bool `json:"enabled"`
// 并发控制
MaxExecutors int `json:"max_executors"`
}
// TriggerPipelineRequest 触发流水线请求