chore: v0.1.1 发版脚本修复与 K8s 镜像坐标更新

- run.sh release 改用 docker-compose build,修复 buildx 缺失导致发版失败
- K8s deployment/quick-deploy 镜像更新为 lghost/aiops:v0.1.1
- 恢复 backend/static/.gitkeep 供 go:embed 目录占位
This commit is contained in:
Logan committed 2026-07-02 08:01:22 +08:00
1 parent 7e1c8f583c
commit 5770f2ccd4
3 files changed
+17 -20

No files matched your search

+1 -1
View File
@@ -58,7 +58,7 @@ spec:
mountPath: /vol mountPath: /vol
containers: containers:
- name: aiops - name: aiops
image: lghost/aiops:dev image: lghost/aiops:v0.1.1
imagePullPolicy: Always imagePullPolicy: Always
ports: ports:
- name: http - name: http
+1 -1
View File
@@ -75,7 +75,7 @@ spec:
mountPath: /vol mountPath: /vol
containers: containers:
- name: aiops - name: aiops
image: lghost/aiops:dev image: lghost/aiops:v0.1.1
imagePullPolicy: IfNotPresent imagePullPolicy: IfNotPresent
ports: ports:
- containerPort: 8080 - containerPort: 8080
+15 -18
View File
@@ -505,27 +505,24 @@ build_embed_image() {
clean_frontend_artifacts clean_frontend_artifacts
clean_embed_static clean_embed_static
export DOCKERHUB_IMAGE
export DOCKER_BUILDKIT=1 export DOCKER_BUILDKIT=1
local build_args=( export COMPOSE_DOCKER_CLI_BUILD=1
-f Dockerfile local compose_cmd
--build-arg "VERSION=${BUILD_VERSION}" compose_cmd=$(detect_compose_cmd)
--build-arg "BUILD_TIME=${BUILD_TIME}" if [ -z "$compose_cmd" ]; then
--build-arg "GIT_COMMIT=${GIT_COMMIT}" error "Docker Compose 未安装,无法构建 embed 镜像"
--label "org.opencontainers.image.version=${BUILD_VERSION}" return 1
-t "$EMBED_IMAGE"
-t "${DOCKERHUB_IMAGE}:dev"
.
)
if [ "$no_cache" -eq 1 ]; then
build_args=(--no-cache --pull "${build_args[@]}")
info "无缓存全量构建 (--no-cache --pull)"
fi fi
info "构建中(前端 + 后端 embed)..." info "使用 $compose_cmd build(version=$BUILD_VERSION)..."
docker build "${build_args[@]}" || { if [ "$no_cache" -eq 1 ]; then
error "镜像构建失败" info "无缓存全量构建 (--no-cache)..."
return 1 $compose_cmd build --no-cache aiops || { error "镜像构建失败"; return 1; }
} else
$compose_cmd build aiops || { error "镜像构建失败"; return 1; }
fi
docker tag "$EMBED_IMAGE" "${DOCKERHUB_IMAGE}:dev" 2>/dev/null || true
local img_size local img_size
img_size=$(docker images "$EMBED_IMAGE" --format "{{.Size}}" | head -1) img_size=$(docker images "$EMBED_IMAGE" --format "{{.Size}}" | head -1)