Skip to content

Latest commit

 

History

History
434 lines (390 loc) · 14.5 KB

get-the-pipeline-orchestration.md

File metadata and controls

434 lines (390 loc) · 14.5 KB

获取流水线编排

请求方法/请求路径

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

资源描述

获取流水线编排

输入参数说明

Query参数

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

Path参数

参数名称 参数类型 必须 参数说明 默认值
projectId string 项目ID
pipelineId string 流水线ID

响应

HTTP代码 说明 参数类型
200 successful operation 数据返回包装模型流水线模型-创建信息

请求样例

curl -X GET '[请替换为API地址栏请求地址]?channelCode={channelCode}'

HEADER样例

accept: application/json
Content-Type: application/json

返回样例-200

{
  "data" : {
    "latestVersion" : 0,
    "pipelineCreator" : "String",
    "name" : "String",
    "stages" : [ {
      "canRetry" : true,
      "checkIn" : {
        "ruleIds" : "string",
        "reviewParams" : [ {
          "valueType" : "ENUM",
          "options" : [ {
            "value" : "String",
            "key" : "String"
          } ],
          "chineseName" : "String",
          "value" : {
            "string" : "string"
          },
          "key" : "String",
          "required" : true,
          "desc" : "String"
        } ],
        "manualTrigger" : true,
        "checkTimes" : 0,
        "reviewDesc" : "String",
        "reviewGroups" : [ {
          "name" : "String",
          "id" : "String",
          "suggest" : "String",
          "params" : [ {
            "valueType" : "ENUM",
            "options" : [ {
              "value" : "String",
              "key" : "String"
            } ],
            "chineseName" : "String",
            "value" : {
              "string" : "string"
            },
            "key" : "String",
            "required" : true,
            "desc" : "String"
          } ],
          "reviewers" : "string",
          "operator" : "String",
          "reviewTime" : 0,
          "status" : "String"
        } ],
        "timeout" : 0,
        "status" : "String"
      },
      "customBuildEnv" : {
        "string" : "string"
      },
      "finally" : true,
      "name" : "String",
      "containers" : [ {
        "canRetry" : true,
        "elementElapsed" : 0,
        "startEpoch" : 0,
        "executeCount" : 0,
        "jobId" : "String",
        "containPostTaskFlag" : true,
        "systemElapsed" : 0,
        "elements" : [ {
          "canRetry" : true,
          "errorType" : "String",
          "errorCode" : 0,
          "canSkip" : true,
          "startEpoch" : 0,
          "version" : "String",
          "executeCount" : 0,
          "templateModify" : true,
          "elementEnable" : true,
          "errorMsg" : "String",
          "elapsed" : 0,
          "atomCode" : "String",
          "additionalOptions" : {
            "enableCustomEnv" : true,
            "continueWhenFailed" : true,
            "manualRetry" : true,
            "pauseBeforeExec" : true,
            "retryCount" : 0,
            "manualSkip" : true,
            "timeout" : 0,
            "customVariables" : [ {
              "value" : "String",
              "key" : "String"
            } ],
            "otherTask" : "String",
            "customEnv" : [ {
              "value" : "String",
              "key" : "String"
            } ],
            "retryWhenFailed" : true,
            "enable" : true,
            "subscriptionPauseUser" : "String",
            "customCondition" : "String",
            "runCondition" : "ENUM",
            "elementPostInfo" : {
              "parentElementId" : "String",
              "postCondition" : "String",
              "parentElementJobIndex" : 0,
              "parentElementName" : "String",
              "postEntryParam" : "String"
            }
          },
          "taskAtom" : "String",
          "name" : "String",
          "id" : "String",
          "classType" : "String",
          "status" : "String"
        } ],
        "name" : "String",
        "id" : "String",
        "startVMStatus" : "String",
        "containerId" : "String",
        "classType" : "String",
        "status" : "String"
      } ],
      "id" : "String",
      "stageControlOption" : {
        "triggered" : true,
        "reviewParams" : [ {
          "valueType" : "ENUM",
          "options" : [ {
            "value" : "String",
            "key" : "String"
          } ],
          "chineseName" : "String",
          "value" : {
            "string" : "string"
          },
          "key" : "String",
          "required" : true,
          "desc" : "String"
        } ],
        "manualTrigger" : true,
        "enable" : true,
        "customCondition" : "String",
        "triggerUsers" : "string",
        "reviewDesc" : "String",
        "runCondition" : "ENUM",
        "timeout" : 0,
        "customVariables" : [ {
          "value" : "String",
          "key" : "String"
        } ]
      },
      "checkOut" : {
        "ruleIds" : "string",
        "reviewParams" : [ {
          "valueType" : "ENUM",
          "options" : [ {
            "value" : "String",
            "key" : "String"
          } ],
          "chineseName" : "String",
          "value" : {
            "string" : "string"
          },
          "key" : "String",
          "required" : true,
          "desc" : "String"
        } ],
        "manualTrigger" : true,
        "checkTimes" : 0,
        "reviewDesc" : "String",
        "reviewGroups" : [ {
          "name" : "String",
          "id" : "String",
          "suggest" : "String",
          "params" : [ {
            "valueType" : "ENUM",
            "options" : [ {
              "value" : "String",
              "key" : "String"
            } ],
            "chineseName" : "String",
            "value" : {
              "string" : "string"
            },
            "key" : "String",
            "required" : true,
            "desc" : "String"
          } ],
          "reviewers" : "string",
          "operator" : "String",
          "reviewTime" : 0,
          "status" : "String"
        } ],
        "timeout" : 0,
        "status" : "String"
      },
      "fastKill" : true
    } ],
    "templateId" : "String",
    "srcTemplateId" : "String",
    "tips" : "String",
    "desc" : "String",
    "labels" : "string",
    "instanceFromTemplate" : true
  },
  "message" : "String",
  "status" : 0
}

数据返回包装模型流水线模型-创建信息

参数名称 参数类型 必须 参数说明
data 流水线模型-创建信息 数据
message string 错误信息
status integer 状态码

流水线模型-创建信息

参数名称 参数类型 必须 参数说明
latestVersion integer 提交时流水线最新版本号
pipelineCreator string 创建人
name string 名称
stages List<流水线模型-阶段> 阶段集合
templateId string 模板ID
srcTemplateId string 源模版ID
tips string 提示
desc string 描述
labels List 标签
instanceFromTemplate boolean 是否从模板中实例化出来的

流水线模型-阶段

参数名称 参数类型 必须 参数说明
canRetry boolean 当前Stage是否能重试
checkIn StagePauseCheck 当前Stage是否能重试
customBuildEnv object 用户自定义环境变量
finally boolean 标识是否为FinallyStage,每个Model只能包含一个FinallyStage,并且处于最后位置
name string 阶段名称
containers List<流水线模型-多态基类> 容器集合
id string 阶段ID
stageControlOption StageControlOption 流程控制选项
checkOut StagePauseCheck 当前Stage是否能重试
fastKill boolean 是否启用容器失败快速终止阶段

StagePauseCheck

参数名称 参数类型 必须 参数说明
ruleIds List ruleIds
reviewParams List<人工审核-自定义参数> reviewParams
manualTrigger boolean manualTrigger
checkTimes integer checkTimes
reviewDesc string reviewDesc
reviewGroups List<Stage审核组信息> reviewGroups
timeout integer timeout
status string status

人工审核-自定义参数

参数名称 参数类型 必须 参数说明
valueType ENUM(STRING, TEXTAREA, BOOLEAN, ENUM, MULTIPLE, ) 参数类型
options List<人工审核-自定义参数-下拉框列表剑> 下拉框列表
chineseName string 中文名称
value object 参数内容
key string 参数名
required boolean 是否必填
desc string 参数描述

人工审核-自定义参数-下拉框列表剑

参数名称 参数类型 必须 参数说明
value string 参数内容
key string 参数名

Stage审核组信息

参数名称 参数类型 必须 参数说明
name string 审核组名称
id string 审核组ID(后台生成)
suggest string 审核建议
params List<人工审核-自定义参数> 审核传入变量
reviewers List 审核人员
operator string 审核操作人
reviewTime integer 审核操作时间
status string 审核结果(枚举)

流水线模型-多态基类

参数名称 参数类型 必须 参数说明
canRetry boolean canRetry
elementElapsed integer elementElapsed
startEpoch integer startEpoch
executeCount integer executeCount
jobId string jobId
containPostTaskFlag boolean containPostTaskFlag
systemElapsed integer systemElapsed
elements List<Element> elements
name string name
id string id
startVMStatus string startVMStatus
containerId string containerId
classType string classType
status string status

Element

参数名称 参数类型 必须 参数说明
canRetry boolean canRetry
errorType string errorType
errorCode integer errorCode
canSkip boolean canSkip
startEpoch integer startEpoch
version string version
executeCount integer executeCount
templateModify boolean templateModify
elementEnable boolean elementEnable
errorMsg string errorMsg
elapsed integer elapsed
atomCode string atomCode
additionalOptions ElementAdditionalOptions additionalOptions
taskAtom string taskAtom
name string name
id string id
classType string classType
status string status

ElementAdditionalOptions

参数名称 参数类型 必须 参数说明
enableCustomEnv boolean enableCustomEnv
continueWhenFailed boolean continueWhenFailed
manualRetry boolean manualRetry
pauseBeforeExec boolean pauseBeforeExec
retryCount integer retryCount
manualSkip boolean manualSkip
timeout integer timeout
customVariables List<NameAndValue> customVariables
otherTask string otherTask
customEnv List<NameAndValue> customEnv
retryWhenFailed boolean retryWhenFailed
enable boolean enable
subscriptionPauseUser string subscriptionPauseUser
customCondition string customCondition
runCondition ENUM(PRE_TASK_SUCCESS, PRE_TASK_FAILED_BUT_CANCEL, PRE_TASK_FAILED_EVEN_CANCEL, PRE_TASK_FAILED_ONLY, OTHER_TASK_RUNNING, CUSTOM_VARIABLE_MATCH, CUSTOM_VARIABLE_MATCH_NOT_RUN, CUSTOM_CONDITION_MATCH, PARENT_TASK_CANCELED_OR_TIMEOUT, PARENT_TASK_FINISH, ) runCondition
elementPostInfo 元素post信息 elementPostInfo

NameAndValue

参数名称 参数类型 必须 参数说明
value string value
key string key

元素post信息

参数名称 参数类型 必须 参数说明
parentElementId string 父元素ID
postCondition string 执行条件
parentElementJobIndex integer 父元素在job中的位置
parentElementName string 父元素名称
postEntryParam string 入口参数

StageControlOption

参数名称 参数类型 必须 参数说明
triggered boolean triggered
reviewParams List<人工审核-自定义参数> reviewParams
manualTrigger boolean manualTrigger
enable boolean enable
customCondition string customCondition
triggerUsers List triggerUsers
reviewDesc string reviewDesc
runCondition ENUM(AFTER_LAST_FINISHED, CUSTOM_VARIABLE_MATCH, CUSTOM_VARIABLE_MATCH_NOT_RUN, CUSTOM_CONDITION_MATCH, ) runCondition
timeout integer timeout
customVariables List<NameAndValue> customVariables