7 Commits

Author SHA1 Message Date
repair-agent
c219ec2fcf feat(hw-ws-service): 将 Go WebSocket 服务纳入 CI/CD 并通过 Traefik 统一入口
Some checks failed
Build and Deploy Backend / build-and-deploy (push) Failing after 4m28s
## 变更内容

### k8s/ingress.yaml
- 新增 /xiaozhi/v1/ 路径规则,将 WebSocket 流量路由到 hw-ws-svc:8888
- Traefik 最长前缀优先,/xiaozhi/v1/ 不影响 / 下的 Django 路由

### hw_service_go/k8s/service.yaml
- Service 类型由 LoadBalancer 改为 ClusterIP
- 移除阿里云 SLB 注解(通过 Traefik Ingress 统一暴露,不再需要独立公网 IP)

### hw_service_go/k8s/deployment.yaml
- 镜像地址改为 ${CI_REGISTRY_IMAGE}/hw-ws-service:latest 占位符
- CI/CD 部署时统一通过 sed 替换为华为云 SWR 实际地址

### hw_service_go/internal/server/server.go
- 新增 GET /xiaozhi/v1/healthz 接口,返回 {"status":"ok","active_connections":N}
- 用于部署后验证服务存活及当前连接数

### .gitea/workflows/deploy.yaml
- 新增 Build and Push HW WebSocket Service 步骤,构建并推送 hw_service_go 镜像
- 部署步骤新增 kubectl apply hw_service_go/k8s/deployment.yaml 和 service.yaml
- 新增 kubectl rollout restart deployment/hw-ws-service

### run.sh
- 本地同时启动 Django + hw_service_go 的开发脚本

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-02 17:16:26 +08:00
repair-agent
9144770130 fix(cicd): replace dead daocloud kubectl mirror with official k8s.io
All checks were successful
Build and Deploy Backend / build-and-deploy (push) Successful in 3m11s
DaoCloud mirror returns 404 for kubectl v1.28.2, causing Setup Kubectl
step to hang. Use official dl.k8s.io with cdn.dl.k8s.io as fallback.
Also update pinned dependency versions.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-24 14:38:16 +08:00
repair-agent
cbcf867b5b fix(cicd): use correct context field names for Log Center fingerprint
Some checks failed
Build and Deploy Backend / build-and-deploy (push) Failing after 54s
Add job_name and step_name to match Log Center's CI/CD fingerprint
generation, replacing failed_step which was not recognized. This fixes
deduplication causing new CI/CD failures to be silently dropped.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-24 13:46:08 +08:00
repair-agent
47bc810256 fix(cicd): use set -o pipefail instead of broken PIPESTATUS approach
Some checks failed
Build and Deploy Backend / build-and-deploy (push) Failing after 57s
PIPESTATUS[0] was consumed by the echo command before exit could use it,
causing build failures to be reported as success. set -o pipefail makes
the entire pipe fail if any command fails, which is simpler and correct.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-24 13:36:26 +08:00
repair-agent
ebe555216b fix(cicd): capture actual build/deploy logs in failure report
Some checks failed
Build and Deploy Backend / build-and-deploy (push) Failing after 1m14s
Replace docker/build-push-action with shell command to capture
stdout/stderr. Include real error output in Log Center report
so repair agent can diagnose CI/CD failures.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-24 13:32:57 +08:00
repair-agent
7603b15ffb feat(ops): add Log Center env vars to K8s and CI/CD failure reporting
Some checks failed
Build and Deploy Backend / build-and-deploy (push) Failing after 1m6s
- K8s: add ENVIRONMENT, LOG_CENTER_URL, LOG_CENTER_ENABLED to dev/prod
- CI/CD: report build/deploy failures to Log Center (source: cicd)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-24 13:17:11 +08:00
zyc
ded5be6a05 add build test
Some checks failed
Build and Deploy Backend / build-and-deploy (push) Failing after 6m4s
2026-01-29 15:16:20 +08:00