feat(ops): U4 后端镜像瘦身 282MB→107MB (62%降幅)
- 移除 git/docker-cli/docker-cli-buildx (~100MB) 改为懒加载 - PipelineHandler 注入 ToolInstaller, runCheckout/runImageBuild 调 EnsureAvailable - UpgradeTools 自动升级 DB 中 git/docker-cli preinstall→lazy - 仅内置 linux-amd64 agent (~12MB节省), arm64/darwin 通过下载API - kubectl 改用 install-kubectl.sh 下载 stripped 版本 - .dockerignore 排除 backend/kubectl 60MB 二进制 - Dockerfile.embed + backend/Dockerfile 同步更新 - 17/17 集成测试通过
This commit is contained in:
1 parent
8dd5a07b70
commit
c624ca5b4a
11 files changed
+175
-47
No files matched your search
@@ -9,6 +9,7 @@ import (
|
||||
"ezops/model"
|
||||
"ezops/middleware"
|
||||
ezredis "ezops/pkg/redis"
|
||||
"ezops/pkg/toolinstaller"
|
||||
|
||||
"github.com/gin-gonic/gin"
|
||||
"gorm.io/gorm"
|
||||
@@ -53,13 +54,14 @@ func validateCode(db *gorm.DB, code string, excludeID uint) string {
|
||||
|
||||
// PipelineHandler 流水线管理器
|
||||
type PipelineHandler struct {
|
||||
db *gorm.DB
|
||||
cache ezredis.Cache
|
||||
db *gorm.DB
|
||||
cache ezredis.Cache
|
||||
toolInstaller *toolinstaller.ToolInstaller
|
||||
}
|
||||
|
||||
// NewPipelineHandler 创建流水线处理器
|
||||
func NewPipelineHandler(db *gorm.DB, cache ezredis.Cache) *PipelineHandler {
|
||||
return &PipelineHandler{db: db, cache: cache}
|
||||
func NewPipelineHandler(db *gorm.DB, cache ezredis.Cache, ti *toolinstaller.ToolInstaller) *PipelineHandler {
|
||||
return &PipelineHandler{db: db, cache: cache, toolInstaller: ti}
|
||||
}
|
||||
|
||||
// PipelineListItem 列表项(含最近一次运行摘要)// Logan.Li
|
||||
|
||||
Reference in new issue
Block a user