• 沒有找到結果。

功能介绍

查询流水线详情。

URI

4-59 参数说明

参数 是否必

参数类型 描述

pipeline_id 是 String 流水线id。

请求消息

请求参数

4-60 Request Header 参数说明

参数 是否必

参数类型 描述

Accept 否 String 为“application/json”时返回json类型的 响应,默认返回yaml类型的响应。

X-Auth-Token 是 String 用户Token,需从华为云IAM服务获取。

响应消息

响应参数

4-61 响应参数

参数 参数类型 描述

name String 流水线名

id Integer 流水线id

group_id Integer 流水线组id group_name String 流水线组名 description String 流水线描述

pre_operation Object 流水线执行的前置操作,详情请参见表4-42。

params Array of

objects 流水线全局变量,详情请参见表4-25。

stages Array of

objects 流水线的执行步骤,详情请参见表4-62。

status Object 流水线状态,详情请参见表4-63。

source String 流水线创建来源,软开云为devcloud,其他服务为 空。

4-62 Stage 参数说明

参数 参数类型 描述

name String 详情请参见表4-26。

id Integer 步骤id

exception_han

dler Object 详情请参见表4-26。

input_resourc

es Array of

objects 详情请参见表4-26。

output_resour

ces Array of

objects 详情请参见表4-26。

pre_operation Object 详情请参见表4-42。

post_operatio

n Object 详情请参见表4-43。

service_name String 详情请参见表4-26。

params Object 详情请参见表4-26。

4-63 Status 参数说明

参数 参数类型 描述

status String 流水线状态,可以为waiting、running、success、

cancel、rollbacking、rollback_success、

stage_exception、runtime_exception、timeout、

unauthorized、rollback_failed、

rollback_exception。

stage_index Integer 流水线当前执行的步骤 created_time String 创建时间

updated_time String 更新时间 start_time String 流水线启动时间 end_time String 流水线结束时间 stages Array of

objects 流水线各步骤状态,详情请参见表4-64。

pre_operation Object 流水线前置操作的状态,详情请参见表4-67。

4-64 StageStatus 参数说明

参数 参数类型 描述

status String 流水线状态,可以为waiting、running、success、

cancel、rollbacking、rollback_success、

stage_exception、runtime_exception、timeout、

unauthorized、rollback_failed、

rollback_exception。

pre_operation Object 步骤的前置操作的状态,详情请参见表4-67。

start_time String 启动时间 end_time String 结束时间

state Object Stage的特殊状态信息,详情请参见表4-65。

4-65 test_review stage 的 state 参数说明

参数 参数类型 描述

review_results Array of

objects 审核结果,详情请参见表4-66。

4-66 ReviewResult 参数说明

参数 参数类型 描述

user_name String 用户名

result String 审核结果,可以为pass、waiting、refuse。

4-67 PreOperationStatus 参数说明

参数 类型 说明

triggers_statu

s Array of

objects 触发器状态,详情请参见表4-68。

4-68 TriggerStatus 参数说明

参数 参数类型 描述

is_satisfied Boolean 状态是否满足

webhook Object Webhook触发时带的参数,详情请参见表4-45。

channel Object Channel触发时带的参数,详情请参见表4-46。

响应示例

{ "id": 1498, "group_id": 2046, "group_name": "sample", "name": "golang-helloworld", "description": "",

"post_operation": { "media_type": "",

"url": "https://github.com/qiujunji123/golang-helloword.git", "branch": "master",

"name": "code_source",

golang:latest\nMAINTAINER HUAWEICLOUD.COM \n\nWORKDIR $GOPATH/src/HelloHuaweiCloud\nADD .

$GOPATH/src/HelloHuaweiCloud\nRUN chmod +x $GOPATH/src/HelloHuaweiCloud/myBuild\n\nEXPOSE 8080\n\nENTRYPOINT [\"./myBuild\"]",

], "status": {

"status": "success", "stage_index": 2,

"start_time": "2019-09-21T11:41:15.922864Z", "end_time": "2019-09-21T11:41:51.978924Z", "pre_operation": {},

"stages": [ {

"status": "success", "pre_operation": { "triggers_status": []

},

"start_time": "2019-09-21T11:41:15.973214Z", "end_time": "2019-09-21T03:41:23Z", "tasks": null

}, {

"status": "success", "pre_operation": { "triggers_status": []

},

"start_time": "2019-09-21T11:41:23.471393Z", "end_time": "2019-09-21T03:41:35Z", "tasks": null

}, {

"status": "success", "pre_operation": { "triggers_status": []

},

"start_time": "2019-09-21T11:41:35.555203Z", "end_time": "2019-09-21T03:41:51Z", "tasks": null

} ],

"created_time": "2019-09-21T11:11:26.404132Z", "updated_time": "2019-09-21T11:41:51.978952Z"

},

"source": "swr"

}

状态码

状态码如表4-69所示。

4-69 状态码

状态码 描述

200 获取成功

400 错误的请求

401 鉴权失败

500 内部错误

相關文件