CRITICAL — Before starting, you MUST first use the Read tool to read ../zentao-shared/SKILL.md, which contains authentication, permission handling, and configuration instructions
Build Search Tips: First distinguish whether the userspecifically specified to use the search skill, and whether they actually providedquery keywords(for example, build name, keywords). If the user specifically specified to use the search skill, or explicitly provided query keywords, prioritize using search. If the user did not specifically specify to use the search skill, and there are no query keywords in the intent, only scope conditions (for example "builds of a certain product", "builds of a certain project"), prioritize using
build list。Friendly Output: When outputting build details, it is recommended to also extract and output the relevant link fields in the command return result (if any), so that users can directly click to jump and view details.
Commands
build list— List builds/versionsbuild get— Get build detailsbuild create— Create a buildbuild update— Update a buildbuild delete— Delete a build
Common Use Cases
List Builds
# 列出所有版本
zentao-cli build list
# 列出某项目的版本
zentao-cli build list --project 1
# 列出某产品的版本
zentao-cli build list --product 1
# 同时按项目和产品筛选
zentao-cli build list --project 1 --product 1
# 列出某执行的版本
zentao-cli build list --execution 5
Get Build Details
# 获取版本详情
zentao-cli build get 10
# 获取版本详情(JSON 格式)
zentao-cli build get 10 --format json
Output Fields
| Field | Type | Description |
|---|---|---|
| id | u64 | Build ID |
| name | string | Build name (for example "v1.0.0", "Build-2024-01-15") |
| product | u64 | Product ID |
| project | u64 | Project ID |
| branch | u64 | Branch/Platform ID |
| scm_path | string | SCM repository path |
| ci | string | CI job name |
| pkg | string | Package path |
| file_size | string | File size (bytes) |
| generated_at | string | Build timestamp |
| editor | string | Last editor |
| created_by | string | Created by |
| created_date | string | Creation time |
| last_edited_by | string | Last editor |
| last_edited_date | string | Last edit time |
| stories | string | Number of associated requirements |
| bugs | string | Number of associated Bugs |
Error Handling
Common Errors
| Error Code | Description | Handling Method |
|---|---|---|
ZEN_NOT_FOUND |
Build does not exist | Check whether the Build ID is correct |
ZEN_AUTH_FAILED |
Authentication failed | Check whether ZENTAO_TOKEN is valid |
ZEN_PARAM_MISSING |
Missing parameters | Check command help to confirm required parameters |
Error Handling Example
# 查看认证状态
zentao-cli auth status
# 验证配置
echo $ZENTAO_URL
echo $ZENTAO_TOKEN
Examples
# 列出所有版本
zentao-cli build list
# 列出某项目的版本
zentao-cli build list --project 1
# 列出某产品的版本
zentao-cli build list --product 1
# 获取版本详情
zentao-cli build get 10
# 获取版本详情(JSON 格式)
zentao-cli build get 10 --format json
Gotchas
- Build ID is a globally unique identifier, not a local display number
- A Build may belong to a Product or Project, pay attention to distinguishing when filtering
- A build may be associated with multiple Stories and Bugs, when viewing details you can pay attention to
storiesandbugsfields
Permission Description
| Operation | Required Permission |
|---|---|
build list |
Project/Product view permission |
build get |
Project/Product view permission |