openUBMC webui 仓库容器化验证报告

仓库: /opt/agent_build_hk_01/workspace/j_pk48zZxw
开始: 2026-09-14T06:00:00 结束: 2026-09-14T06:20:00 总耗时: 1200s 步骤: 17

1. 环境规格

宿主机

architecture
x86_64
cpu_model
Intel(R) Xeon(R) Gold 6151 CPU @ 3.00GHz
cpu_cores
32
memory
62Gi
disk
197G (96G available)
docker_version
Docker version 29.1.3, build 29.1.3-0ubuntu3~24.04.2

容器

os
Ubuntu 24.04.3 LTS (Noble Numbat)
architecture
x86_64
cpu_cores
32
memory
62Gi (无限制)

镜像来源

image
swr.cn-north-4.myhuaweicloud.com/openubmc/ubuntu:24.04.2_26.06
选择理由
README 与 .devcontainer/devcontainer.json 均推荐使用 swr.cn-north-4.myhuaweicloud.com/openubmc/ubuntu:24.04.2_26.06 镜像;README 明确声明仅支持 Ubuntu 24.04 LTS,openEuler/CentOS/Debian 等不支持

2. 文档阅读摘要

架构

来源: README.md - 系统要求章节

x86-64 (amd64),README 明确声明仅支持此架构

推荐镜像

来源: README.md - 系统要求章节 + .devcontainer/devcontainer.json

swr.cn-north-4.myhuaweicloud.com/openubmc/ubuntu:24.04.2_26.06(README 与 devcontainer.json 均指定)

构建命令

来源: README.md - 构建/组件级构建章节 + manifest README 第3.3节

cd /home/workspace/webui && bingo build --stage=dev (conanfile.py build 方法内部执行 generate_configure_file + npm install + npm run build)

测试命令

来源: README.md - 测试章节 + package.json scripts

npm run lint (eslint --fix);npx vue-tsc --noEmit;npx vitest run (package.json test 脚本)

样例命令

来源: README.md - 本地开发调试章节 + 构建产物验证

构建产物为前端静态包(Conan package webui/1.100.116@openubmc.dev/dev),部署到 BMC Web 服务器 /opt/bmc/web/htdocs/,通过 HTTP 服务 index.html 做冒烟测试;无独立可执行样例

依赖

来源: README.md + manifest 仓库 README.md(openUBMC 构建指导书) + conanfile.py

  • 操作系统: Ubuntu 24.04 LTS (仅支持此版本)
  • Python >= 3.10 (init.py 运行依赖)
  • Node.js >= 18 LTS (init.py 安装 v20.18.0)
  • npm >= 8 (随 Node.js 安装 v10.8.2)
  • Conan 2 (init.py 安装 v2.30.0)
  • bingo (init.py 安装 v0.8.23)
  • git/python3/sudo/make/locales/wget/curl/libcurl4t64/libcurl4-openssl-dev/pkg-config (容器裸镜像基础工具)
  • openUBMC APT 源 + GPG 密钥 (init.py 自动配置)
  • pre-commit 工具: node/stylua/luacheck (init.py 安装)
  • QEMU 环境 (init.py 安装 openubmc-qemu)
  • SDK: openubmc_sdk (Conan 构建时自动拉取)

特殊依赖

来源: manifest README 第1.3节网络访问要求 + 第2.6节

  • mirrors.huaweicloud.com (公共镜像站)
  • registry.npmmirror.com (npm 镜像源)
  • openubmc-apt-repo.obs.cn-north-4.myhuaweicloud.com (openUBMC APT 仓库)
  • conan.openubmc.cn (Conan 包管理仓库 openubmc_opensource 远程)
  • gitcode.com (代码托管 + pre-commit-hooks 仓库)
  • repo.openubmc.cn (openUBMC 工具仓库)
  • Conan 凭证: 社区账号 ****** (密码已脱敏),init.py -user/-psw 参数登录

3. 执行日志

时间命令状态耗时(s)输出摘要错误/备注
2026-09-14T06:01:00pre-commit run --all-files (宿主机本地执行)成功
rc=0
7Check .sr Files...Skipped; Check JSON...Passed; Check YAML...Passed; prettier...Passed; trim trailing whitespace...Passed; fix end of files...Passed; check for merge conflicts...Passed; check for added large files...Passed; check for case conflicts...Passed; detect private key...Passed; normalize-package-lock...Passed—
2026-09-14T06:01:30检查 lint-runner 配置: find . -name '.lint-runner.*' -o -name 'lint-runner.config.*' -o -name '.lintrunner.*'成功
rc=0
1未找到 lint-runner 配置文件—
2026-09-14T06:02:00ls .devcontainer/成功
rc=0
1devcontainer.json (已配置,image=swr...ubuntu:24.04.2_26.06,forwardPorts 8000/8080,含 VSCode 扩展配置)—
2026-09-14T06:03:00docker pull swr.cn-north-4.myhuaweicloud.com/openubmc/ubuntu:24.04.2_26.06成功
rc=0
5Digest: sha256:fb8475c8c5a1ab9e4ae27348954fcb8d9e14bd52df96f5b2f4a3f19eaf8a6303;Status: Image is up to date—
2026-09-14T06:03:30docker run -d --name ttfhw-webui-env -w /home/workspace swr.cn-north-4.myhuaweicloud.com/openubmc/ubuntu:24.04.2_26.06 tail -f /dev/null成功
rc=0
3Container ID: cdd9057157d9;容器 Ubuntu 24.04.3 LTS x86_64 32核 62Gi—
2026-09-14T06:04:00apt-get update && apt-get install -y python3 python3-pip sudo make locales wget curl git libcurl4t64 libcurl4-openssl-dev pkg-config gnupg software-properties-common apt-transport-https ca-certificates lsb-release unzip成功
rc=0
60基础工具安装完成(dbus/packagekit 提示为容器内无系统总线,属正常现象)—
2026-09-14T06:05:00git clone --depth 1 https://gitcode.com/openUBMC/manifest.git /home/workspace/manifest成功
rc=0
15manifest 仓库克隆完成—
2026-09-14T06:06:00cd /home/workspace/manifest && export OPENUBMC_LICENSE=true && echo 'Y' | python3 init.py -user ****** -psw '<已脱敏>'成功
rc=0
300[INFO] 系统: ubuntu(legacy-full); board: openUBMC; installed: bootstrap(bingo apt deb 源+deb 包+pip 升级)、pre-commit 工具(node/stylua/luacheck)、bmc_sdk(board=openUBMC)、QEMU 环境; skipped: BMC Studio; [INFO] openUBMC开发者环境初始化完成!—
2026-09-14T06:11:00bingo --version; conan --version; node --version; npm --version; conan remote list; ls /opt/RTOS/成功
rc=0
10bingo 0.8.23; conan 2.30.0; node v20.18.0; npm 10.8.2; remote: openubmc_opensource https://conan.openubmc.cn; /opt/RTOS/208.11.0 存在; conan2 profiles: default/profile.ini/profile.dt.ini/profile.luajit.ini—
2026-09-14T06:11:30conan search --remote openubmc_opensource '*'成功
rc=0
8Connecting to remote 'openubmc_opensource' with user '******'; Found 4180 pkg/version recipes—
2026-09-14T06:12:00cd /home/workspace/webui && bingo build --stage=dev成功
rc=0
79npm install: added 1034 packages in 23s; npm run build: vite built in 38.57s; gzipper 压缩 426 文件; package(): npm install --production added 94 packages in 6s; webui/1.100.116@openubmc.dev/dev 包构建成功; Full package reference: webui/1.100.116@openubmc.dev/dev#9c54fb93...:867734ce...#940d5672...real 1m19.469s;产物包文件夹 /root/.conan2/p/b/webui2959eac721962/p/opt/bmc/web/htdocs/ (4.4M)
2026-09-14T06:14:00cd /home/workspace/webui && npm install (恢复 devDependencies 以便执行测试)成功
rc=0
17added 1032 packages in 17sbingo package() 步骤执行了 rm -rf node_modules + npm install --production,测试前需恢复全部依赖
2026-09-14T06:15:00npm run lint (eslint src/**/*.{js,ts,vue,jsx,tsx} --fix) — 首次执行(默认 /bin/sh=bash)失败
rc=2
1ESLint: No files matching the pattern "src/**/*.js" were found容器 /bin/sh 软链接到 bash(非 dash),bash 对 src/**/*.{js,ts,vue,jsx,tsx} 做花括号展开,拆成 5 个模式分别传给 eslint,其中 src/**/*.js 无匹配文件触发 ESLint 报错 | 环境不兼容:标准 Ubuntu /bin/sh 为 dash(不做花括号展开),此镜像为 bash
2026-09-14T06:15:30npm config set script-shell /bin/dash && npm run lint (修正 script-shell 后重试)失败
rc=1
34✖ 284 problems (256 errors, 28 warnings);主要规则: max-lines-per-function(函数行数超 50)、complexity(圈复杂度超 15)、camelcase、max-statements 等;--fix 已自动修复可修复项(142 个文件被格式化)源码存在 256 个不可自动修复的 ESLint 规则违例(函数过长/复杂度超标/命名风格)
2026-09-14T06:16:00npx vue-tsc --noEmit失败
rc=2
32tsconfig.json(17,5): error TS5101: Option 'suppressImplicitAnyIndexErrors' is deprecated and will stop functioning in TypeScript 5.5. Specify compilerOption "ignoreDeprecations": "5.0" to silence this error.tsconfig.json 启用了已弃用选项 suppressImplicitAnyIndexErrors,仓库自带 TypeScript 5.5.2 将其视为错误(TS5101),导致类型检查无法进行 | 属仓库配置问题(tsconfig 与自带 TS 版本不兼容),未修改源码
2026-09-14T06:16:40npx vitest run失败
rc=1
16Test Files 1 failed | 9 passed (10); Tests 1 failed | 210 passed (211); Duration 3.16s; JUNIT 报告写入 tests/reports/js_test.xml失败用例: tests/unit/utils/date.spec.ts > Date.prototype.pattern Tests > should format hour correctly — expect(date.pattern('HH')).toBe('20') 实际得到 '12'(期望 20 得到 12,小时格式化断言不符) | 210/211 用例通过;唯一失败为 date 小时格式化断言,疑与测试用例构造的日期对象小时值有关
2026-09-14T06:18:00冒烟测试: 在产物包 htdocs 目录启动 python3 -m http.server 并 curl index.html 及资源成功
rc=0
5index.html: HTTP 200, 1457 bytes, <title version="3.0"> 存在; assets 目录含 261 个 .gz 预压缩资源文件(BMC Web 服务器以 gzip 方式提供); index.html 以 /UI/Static/ 为 base 引用 assets,符合 BMC 部署约定构建产物为前端静态包,部署于 /opt/bmc/web/htdocs/,无独立可执行样例;冒烟测试验证产物可被 HTTP 服务正常返回

4. 流程时间线

2026-09-14T06:00:00
start — 开始验证流程 已启动
2026-09-14T06:01:00
document_reading — 阅读 README.md / conanfile.py / package.json / vite.config.ts,并克隆 manifest 仓库阅读 openUBMC 构建指导书 成功
详情
files_read
["README.md", "conanfile.py", "package.json", "vite.config.ts", ".devcontainer/devcontainer.json", "docs/WebUI前端开发说明.md", "manifest/README.md"]
build_tool
bingo+conan2
build_cmd
bingo build --stage=dev
2026-09-14T06:01:30
static_analysis_scan — 检查仓库 pre-commit 与 lint-runner 配置 pre-commit 已配置 / lint-runner 未配置
详情
pre_commit_config
.pre-commit-config.yaml
hooks_total
13
commit_msg_hooks
2
file_hooks_run
11
2026-09-14T06:01:30
static_analysis_execution — 执行 pre-commit run --all-files 全部通过(1 跳过)
详情
passed
10
failed
0
skipped
1
skipped_hook
Check .sr Files(无 .sr 文件)
2026-09-14T06:02:00
devcontainer_scan — 检查 .devcontainer 目录及配置 已配置
详情
config_dir
.devcontainer
files
["devcontainer.json"]
image
swr.cn-north-4.myhuaweicloud.com/openubmc/ubuntu:24.04.2_26.06
forwardPorts
[8000, 8080]
2026-09-14T06:03:00
image_selection — 选择基础镜像 openubmc/ubuntu:24.04.2_26.06
详情
selection_reason
README 与 devcontainer.json 均推荐此镜像,README 声明仅支持 Ubuntu 24.04 LTS
2026-09-14T06:03:30
container_setup — 拉取镜像并启动容器 ttfhw-webui-env 成功
详情
image
swr.cn-north-4.myhuaweicloud.com/openubmc/ubuntu:24.04.2_26.06
container_os
Ubuntu 24.04.3 LTS
2026-09-14T06:04:00
dependency_installation — 安装容器基础工具 + 执行 init.py 一键环境初始化 成功
详情
base_tools
python3/git/make/wget/curl/libcurl4t64/libcurl4-openssl-dev/pkg-config 等
init_py_steps
系统检查+依赖安装+APT源+bingo+Conan登录+pre-commit工具+SDK+QEMU
tools_installed
bingo 0.8.23, conan 2.30.0, node v20.18.0, npm 10.8.2
conan_login
openubmc_opensource 远程以用户 ****** 登录成功(4180 包可访问)
2026-09-14T06:12:00
build_attempt — 执行组件级构建 bingo build --stage=dev 成功
详情
conan_package
webui/1.100.116@openubmc.dev/dev
npm_install
1034 包 23s
vite_build
38.57s
total
1m19s
artifact_path
/root/.conan2/p/b/webui2959eac721962/p/opt/bmc/web/htdocs/
2026-09-14T06:15:00
problem_resolution — 问题定位:npm run lint 因 /bin/sh→bash 花括号展开报错;设置 npm script-shell=/bin/dash 恢复标准 Ubuntu 行为后重试 已解决(环境修正)
详情
solution
npm config set script-shell /bin/dash
root_cause
镜像 /bin/sh 软链接 bash 而非标准 dash
2026-09-14T06:15:30
ut_execution — 执行 lint / vue-tsc / vitest 部分通过
详情
lint
284 problems(256 err/28 warn) exit1
vue_tsc
TS5101 exit2(tsconfig 弃用选项)
vitest
210 passed/1 failed(211)
2026-09-14T06:18:00
sample_execution — 对构建产物(前端静态包)做 HTTP 冒烟测试 成功
详情
index_html
HTTP 200 1457B
assets
261 个 .gz 预压缩资源
base_path
/UI/Static/
2026-09-14T06:20:00
cleanup — 停止并删除容器 成功
详情
container
ttfhw-webui-env
2026-09-14T06:20:00
report_generation — 生成验证报告并转换为静态 HTML(敏感信息脱敏) 成功
详情
output_json
verification_report_WSL_webui_20260914.json
output_html
verification_report_WSL_webui_20260914.html

5. 最终结果

静态检查

已配置

检测到 pre-commit 配置(13 个 hooks,文件类 11 个全部通过、1 跳过;commit-msg 类 2 个未在 --all-files 模式运行),未检测到 lint-runner 配置

pre-commit: 通过 | 10/13 通过, 1 跳过, 0 失败

lint-runner: 未配置

DevContainer

已配置

已配置 devcontainer,基于 swr.cn-north-4.myhuaweicloud.com/openubmc/ubuntu:24.04.2_26.06 镜像,工作目录 /workspace,转发端口 8000/8080,含 C++/Python/Vue 相关 VSCode 扩展配置

构建

成功

耗时 79s

产物:

  • webui Conan 包 — ~/.conan2/p/b/webui2959eac721962/p/ (Conan 本地缓存) (4.4 MB)
  • 前端静态站点 htdocs — ~/.conan2/p/b/webui2959eac721962/p/opt/bmc/web/htdocs/ (4.4 MB (含 index.html + 261 个 .gz 资源 + font/image/style))
  • package reference — webui/1.100.116@openubmc.dev/dev#9c54fb93d32b0e61c8ee908364475206:867734cea45654f856023628afb56a05e45da4e5#940d5672a782fc3e07bd4a351e1a7f49 (—)

单元测试/检查

部分通过

总耗时 82s

ESLint: 失败 — 284 问题(256错误/28警告)

vue-tsc: 失败 — 1 错误

vitest: 失败 — 210/211 用例通过, 1 失败

失败: tests/unit/utils/date.spec.ts > Date.prototype.pattern Tests > should format hour correctly
expected '12' to be '20' (date.pattern('HH') 小时格式化断言不符)

样例/冒烟测试

成功

耗时 5s

构建产物 HTTP 冒烟测试(index.html) — 成功

产物包 htdocs 经 python3 -m http.server 服务,index.html 返回 HTTP 200(1457B),<title version=3.0> 存在;assets 含 261 个 .gz 预压缩资源;index.html 以 /UI/Static/ 为 base 引用资源,符合 BMC Web 部署约定

6. 文档缺口

7. 遇到的问题与解决

时间问题解决方案来源
2026-09-14T06:12:00 首次 bingo build 因源码缺少 .git 目录,bingo 执行 git remote -v 失败(exit 128),构建中断 重新拷贝源码时保留 .git 目录(仅排除 node_modules/dist),git remote -v 正常,构建成功 bingo build 依赖 git remote 信息识别仓库
2026-09-14T06:15:00 npm run lint 报 'No files matching the pattern src/**/*.js were found',ESLint 退出码 2 定位为容器 /bin/sh 软链接到 bash(非标准 dash)导致花括号展开;执行 npm config set script-shell /bin/dash 恢复标准 Ubuntu 行为后重试,lint 正常执行(报 284 个源码规则违例) package.json lint 脚本: eslint src/**/*.{js,ts,vue,jsx,tsx} --fix (未加引号)
2026-09-14T06:16:00 npx vue-tsc --noEmit 报 TS5101: Option 'suppressImplicitAnyIndexErrors' is deprecated 属仓库 tsconfig.json 与自带 TypeScript 5.5.2 配置不兼容问题,按约束不修改源码,记录为类型检查失败 tsconfig.json 第 17 行 suppressImplicitAnyIndexErrors 选项
2026-09-14T06:16:40 vitest 单元测试 1 个用例失败: date.spec.ts should format hour correctly,expect(date.pattern('HH')).toBe('20') 实际 '12' 属测试用例断言与实现不符(小时格式化返回 12 而非期望 20),按约束不修改源码,记录为 1/211 用例失败 tests/unit/utils/date.spec.ts:38