查看流水线详情
功能介绍
此API用于查看流水线详情。
URI
GET /cpepipeline/v2/pipelines/{pipeline_id}
参数 | 是否必选 | 参数类型 | 描述 |
|---|---|---|---|
pipeline_id | 是 | String | 流水线ID。 |
请求消息
参数 | 是否必选 | 参数类型 | 描述 |
|---|---|---|---|
Content-Type | 是 | String | 消息体的类型(格式),默认取值为“application/json;charset=utf8”。 |
X-Auth-Token | 是 | String | 调用接口的认证方式分为Token和AK/SK两种,如果您使用的Token方式,此参数为必填,请填写Token的值。Token获取方式,请参考获取用户Token。 |
响应消息
参数 | 参数类型 | 描述 |
|---|---|---|
project | String | 项目名称。 |
domain | String | 租户名称。 |
id | String | 流水线ID。 |
enterpriseProjectId | String | 企业项目ID。 |
modelVersion | Integer | 流水线类型。 |
creator | String | 创建者。 |
revisor | String | 修订者。 |
createdAt | Integer | 创建时间。 |
createdAt | Integer | 修改时间。 |
failMode | String | 激进策略。 |
strategyType | Integer | 触发策略。 |
pipelineDeclaration | Object | 流水线定义,详情请见表4。 |
参数 | 参数类型 | 描述 |
|---|---|---|
name | String | 流水线名称 |
modelVersion | Integer | 流水线类型。 |
version | Integer | 流水线版本。 |
stages | Array of objects | 流水线阶段,详情请见表5。 |
configMode | String | 流水线创建类型。 |
参数 | 参数类型 | 描述 |
|---|---|---|
id | String | 阶段ID。 |
name | String | 阶段名称。 |
displayName | String | 阶段显示名称。 |
type | String | 阶段类型。 |
pipelineId | String | 流水线ID。 |
orderIndex | String | 阶段执行顺序。 |
status | Integer | 阶段状态。 |
taskGroup | String | 任务组。 |
tasks | Array of objects | 流水线任务,详情请见表6 |
请求示例
无
响应示例
{
"project": "cn-north-4",
"domain": "hwstaff_pub_servicestagew3",
"id": "c5a2abab-6c56-4b04-bb67-92470daef78f",
"enterpriseProjectId": "0",
"name": "testzasd",
"enterpriseProject": "default",
"modelVersion": 1,
"creator": "zhangyuhao",
"revisor": "zhangyuhao",
"createdAt": 1753080263966,
"updatedAt": 1753080263966,
"failMode": "stop",
"strategyType": 0,
"pipelineDeclaration": {
"name": "testzasd",
"description": "",
"modelVersion": 0,
"version": 1,
"stages": [
{
"id": 0,
"name": "Artifacts",
"approvalType": 0,
"displayName": null,
"type": null,
"pipelineId": null,
"orderIndex": 0,
"status": null,
"taskGroup": null,
"tasks": [
{
"id": 0,
"name": "ghy-test-comp-0626-3-62e353",
"displayName": "Empty",
"taskTypeId": {
"category": "Build",
"owner": "System",
"provider": "Assembling",
"type": null
},
"input": {
"assemblingId": "audzvfrtnru94o8jtb9g38svx0rezi86rq43ff8m"
},
"output": {},
"status": null,
"orderIndex": 0,
"skipped": false,
"groupIndex": null,
"delayTime": 0,
"errorDetails": null,
"stageName": null
}
]
},
{
"id": 0,
"name": "Environments",
"approvalType": 0,
"displayName": null,
"type": null,
"pipelineId": null,
"orderIndex": 0,
"status": null,
"taskGroup": null,
"tasks": [
{
"id": 0,
"name": "production",
"displayName": "echotest-nodel",
"taskTypeId": {
"category": "Environment",
"owner": "System",
"provider": "Environment",
"type": null
},
"input": {
"environment_id": "6a67914f-8233-4a62-bd7c-5905bfde5df8"
},
"output": {},
"status": null,
"orderIndex": 0,
"skipped": false,
"groupIndex": null,
"delayTime": 0,
"errorDetails": null,
"stageName": null
}
]
}
],
"configMode": "ui"
}
} 状态码
状态码 | 描述 |
|---|---|
200 | 操作成功。 |
400 | 错误的请求。 |
错误码
请参考ServiceStage错误码。

