该Docker镜像为Mayastor存储系统提供CI/CD测试工具,旨在通过自动化测试流程,确保Mayastor在持续集成(CI)和持续部署(CD)环境中的功能正确性、性能稳定性及兼容性。主要用于开发团队在代码提交、版本构建及部署前的自动化验证,减少人工测试成本,加速开发迭代。
拉取镜像
bashdocker pull mayastor/test-utility:latest
运行基础测试
bashdocker run --rm \ -e MAYASTOR_VERSION=v2.5.0 \ # 指定目标Mayastor版本 -e TEST_TYPE=functional \ # 测试类型:functional/integration/performance -v $(pwd)/reports:/reports \ # 挂载宿主机目录存储测试报告 mayastor/test-utility:latest
yamlversion: '3.8' services: mayastor-test: image: mayastor/test-utility:latest environment: - MAYASTOR_VERSION=v2.5.0 - TEST_TYPE=integration - REPORT_FORMAT=junit # 报告格式:junit/html - LOG_LEVEL=info # 日志级别:debug/info/warn/error volumes: - ./test-reports:/reports - ./test-config:/config # 挂载自定义测试配置文件 network_mode: host # 如需访问宿主机Mayastor服务,可使用host网络
| 环境变量名 | 描述 | 默认值 | 可选值 |
|---|---|---|---|
MAYASTOR_VERSION | 目标测试的Mayastor版本 | latest | 如v2.4.1、v2.5.0-rc1等 |
TEST_TYPE | 测试类型 | functional | functional/integration/performance |
REPORT_FORMAT | 测试报告格式 | junit | junit/html |
REPORT_PATH | 容器内报告存储路径 | /reports | 自定义路径(需配合卷挂载) |
LOG_LEVEL | 日志输出级别 | info | debug/info/warn/error |
TEST_TIMEOUT | 单测试用例超时时间(秒) | 300 | 正整数 |
CUSTOM_CONFIG_PATH | 自定义测试配置文件路径 | /config | 需通过卷挂载外部配置文件 |
在.gitlab-ci.yml中添加测试阶段:
yamlstages: - test mayastor-test: stage: test image: mayastor/test-utility:latest variables: MAYASTOR_VERSION: v2.5.0 TEST_TYPE: integration REPORT_FORMAT: junit script: - /entrypoint.sh # 镜像内置入口脚本,执行测试流程 artifacts: paths: - reports/ # 保存测试报告为CI制品 reports: junit: reports/junit.xml # GitLab自动解析JUnit报告
您可以使用以下命令拉取该镜像。请将 <标签> 替换为具体的标签版本。如需查看所有可用标签版本,请访问 标签列表页面。





探索更多轩辕镜像的使用方法,找到最适合您系统的配置方式
通过 Docker 登录认证访问私有仓库
无需登录使用专属域名
Kubernetes 集群配置 Containerd
K3s 轻量级 Kubernetes 镜像加速
VS Code Dev Containers 配置
Podman 容器引擎配置
HPC 科学计算容器配置
ghcr、Quay、nvcr 等镜像仓库
Harbor Proxy Repository 对接专属域名
Portainer Registries 加速拉取
Nexus3 Docker Proxy 内网缓存
需要其他帮助?请查看我们的 常见问题Docker 镜像访问常见问题解答 或 提交工单
docker search 限制
站内搜不到镜像
离线 save/load
插件要用 plugin install
WSL 拉取慢
安全与 digest
新手拉取配置
镜像合规机制
manifest unknown
no matching manifest(架构)
invalid tar header(解压)
TLS 证书失败
DNS 超时
域名连通性排查
410 Gone 排查
402 与流量用尽
401 认证失败
429 限流
D-Bus 凭证提示
413 与超大单层
来自真实用户的反馈,见证轩辕镜像的优质服务