获取流水线构建历史

请求方法/请求路径

GET /ms/openapi/api/apigw/v3/projects/{projectId}/pipelines/{pipelineId}/builds/history

资源描述

获取流水线构建历史

输入参数说明

Query参数

参数名称参数类型必须参数说明默认值

page

integer

第几页

1

pageSize

integer

每页多少条

20

channelCode

string

渠道号,默认为BS

Path参数

参数名称参数类型必须参数说明默认值

projectId

string

项目ID

pipelineId

string

流水线ID

响应

请求样例

curl -X GET '[请替换为API地址栏请求地址]?page={page}&pageSize={pageSize}&channelCode={channelCode}' \
-H 'X-DEVOPS-UID:xxx'

HEADER样例

accept: application/json
Content-Type: application/json
X-DEVOPS-UID:xxx

返回样例-200

{
  "data" : {
    "pipelineVersion" : 0,
    "records" : [ {
      "buildNum" : 0,
      "buildNumAlias" : "String",
      "stageStatus" : [ {
        "name" : "String",
        "stageId" : "String"
      } ],
      "remark" : "String",
      "buildMsg" : "String",
      "startTime" : 0,
      "id" : "String",
      "recommendVersion" : "String",
      "retry" : true,
      "totalTime" : 0,
      "webHookType" : "String",
      "mobileStart" : true,
      "startType" : "String",
      "trigger" : "String",
      "userId" : "String",
      "deleteReason" : "String",
      "queueTime" : 0,
      "pipelineVersion" : 0,
      "buildParameters" : [ {
        "valueType" : "ENUM",
        "readOnly" : true,
        "value" : {
          "string" : "string"
        },
        "key" : "String"
      } ],
      "material" : [ {
        "newCommitId" : "String",
        "aliasName" : "String",
        "commitTimes" : 0,
        "branchName" : "String",
        "url" : "String",
        "newCommitComment" : "String"
      } ],
      "currentTimestamp" : 0,
      "artifactList" : [ {
        "fullPath" : "String",
        "modifiedTime" : 0,
        "appVersion" : "String",
        "shortUrl" : "String",
        "downloadUrl" : "String",
        "fullName" : "String",
        "path" : "String",
        "folder" : true,
        "size" : 0,
        "name" : "String",
        "artifactoryType" : "ENUM",
        "properties" : [ {
          "value" : "String",
          "key" : "String"
        } ],
        "md5" : "String"
      } ],
      "endTime" : 0,
      "webhookInfo" : {
        "webhookBranch" : "String",
        "webhookEventType" : "String",
        "webhookMessage" : "String",
        "webhookMergeCommitSha" : "String",
        "webhookRepoUrl" : "String",
        "webhookCommitId" : "String",
        "webhookType" : "String"
      },
      "errorInfoList" : [ {
        "atomCode" : "String",
        "errorType" : 0,
        "errorCode" : 0,
        "taskName" : "String",
        "taskId" : "String",
        "errorMsg" : "String"
      } ],
      "status" : "String",
      "executeTime" : 0
    } ],
    "count" : 0,
    "totalPages" : 0,
    "pageSize" : 0,
    "page" : 0,
    "hasDownloadPermission" : true
  },
  "message" : "String",
  "status" : 0
}

数据返回包装模型构建历史-分页数据包装模型历史构建模型

参数名称参数类型必须参数说明

data

数据

message

string

错误信息

status

integer

状态码

构建历史-分页数据包装模型历史构建模型

参数名称参数类型必须参数说明

pipelineVersion

integer

最新的编排版本号

records

数据

count

integer

总记录行数

totalPages

integer

总共多少页

pageSize

integer

每页多少条

page

integer

第几页

hasDownloadPermission

boolean

是否拥有下载构建的权限

历史构建模型

参数名称参数类型必须参数说明

buildNum

integer

构建号

buildNumAlias

string

自定义构建版本号

stageStatus

各阶段状态

remark

string

备注

buildMsg

string

构建信息

startTime

integer

开始时间

id

string

构建ID

recommendVersion

string

推荐版本号

retry

boolean

是否重试

totalTime

integer

总耗时(秒)

webHookType

string

WebHookType

mobileStart

boolean

mobileStart

startType

string

启动类型(新)

trigger

string

触发条件

userId

string

启动用户

deleteReason

string

结束原因

queueTime

integer

排队于

pipelineVersion

integer

编排文件版本号

buildParameters

启动参数

material

原材料

currentTimestamp

integer

服务器当前时间戳

artifactList

构件列表

endTime

integer

结束时间

webhookInfo

webhookInfo

errorInfoList

流水线任务执行错误

status

string

状态

executeTime

integer

运行耗时(秒,不包括人工审核时间)

历史构建阶段状态

参数名称参数类型必须参数说明

name

string

阶段名称

stageId

string

阶段ID

构建模型-构建参数

参数名称参数类型必须参数说明

valueType

ENUM(STRING, TEXTAREA, ENUM, DATE, LONG, BOOLEAN, SVN_TAG, GIT_REF, MULTIPLE, CODE_LIB, CONTAINER_TYPE, ARTIFACTORY, SUB_PIPELINE, CUSTOM_FILE, PASSWORD, TEMPORARY, )

元素值类型

readOnly

boolean

是否只读

value

object

元素值名称-显示用

key

string

元素值ID-标识符

PipelineBuildMaterial

参数名称参数类型必须参数说明

newCommitId

string

newCommitId

aliasName

string

aliasName

commitTimes

integer

commitTimes

branchName

string

branchName

url

string

url

newCommitComment

string

newCommitComment

版本仓库-文件信息

参数名称参数类型必须参数说明

fullPath

string

文件全路径

modifiedTime

integer

更新时间

appVersion

string

app版本

shortUrl

string

下载短链接

downloadUrl

string

下载链接

fullName

string

文件全名

path

string

文件路径

folder

boolean

是否文件夹

size

integer

文件大小(byte)

name

string

文件名

artifactoryType

ENUM(PIPELINE, CUSTOM_DIR, )

仓库类型

properties

元数据

md5

string

MD5

版本仓库-元数据

参数名称参数类型必须参数说明

value

string

元数据值

key

string

元数据键

WebhookInfo

参数名称参数类型必须参数说明

webhookBranch

string

webhookBranch

webhookEventType

string

webhookEventType

webhookMessage

string

webhookMessage

webhookMergeCommitSha

string

webhookMergeCommitSha

webhookRepoUrl

string

webhookRepoUrl

webhookCommitId

string

webhookCommitId

webhookType

string

webhookType

插件错误信息

参数名称参数类型必须参数说明

atomCode

string

插件编号

errorType

integer

错误类型

errorCode

integer

错误码

taskName

string

插件名称

taskId

string

插件ID

errorMsg

string

错误信息

最后更新于