feat: Agent批量升级 + 版本号注入 + 服务器凭证下拉关联
- Dockerfile: ARG VERSION/BUILD_TIME 通过 ldflags 注入 agent+backend 二进制 - run.sh: 自动从 git tag 获取版本号 - docker-compose: build args 传递 VERSION/BUILD_TIME - backend: BatchUpgradeAgent SSH下载新二进制+重启, /agent/bin 静态文件服务 - frontend: 监控大屏添加批量升级按钮 (闪电图标) - frontend: 服务器编辑/添加表单改为凭证下拉选择器 - frontend: ServerForm 加载 /credentials 列表, 选择后自动填充用户名/认证方式
This commit is contained in:
1 parent
228b6b52f9
commit
ed08ea255e
9 files changed
+253
-52
No files matched your search
@@ -306,7 +306,13 @@ cmd_docker() {
|
||||
error "Docker Compose 未安装 (需要 docker compose 插件或 docker-compose)"
|
||||
exit 1
|
||||
fi
|
||||
# 自动从 git tag 获取版本号
|
||||
GIT_TAG=$(git describe --tags --abbrev=0 2>/dev/null || echo "")
|
||||
BUILD_TIME=$(date -u +%Y-%m-%dT%H:%M:%SZ)
|
||||
export VERSION="${GIT_TAG:-dev}"
|
||||
export BUILD_TIME
|
||||
info "使用: $DOCKER_COMPOSE"
|
||||
info "版本: $VERSION (构建时间: $BUILD_TIME)"
|
||||
|
||||
case "$action" in
|
||||
up)
|
||||
|
||||
Reference in new issue
Block a user