流水线 CODEARTS PIPELINE-启动流水线:请求示例

时间:2023-12-06 10:17:46

请求示例

启动流水线。 指定运行的分支为”master”,参数为”key:val”。

POST https://{endpoint}/v5/54f90b75fc1447b1b65e8d3a9f77923d/api/pipelines/e5460d1d403146a1935c2d4b68ef506c/run

{
  "sources" : [ {
    "type" : "code",
    "params" : {
      "git_type" : "codehub",
      "codehub_id" : "2111699716",
      "default_branch" : "test-lbdsb11",
      "git_url" : "https://example.com/clsyz00001/111.git",
      "build_params" : {
        "build_type" : "branch",
        "event_type" : "Manual",
        "target_branch" : "test-lbdsb11"
      }
    }
  } ],
  "description" : "运行描述",
  "variables" : [ {
    "name" : "key",
    "value" : "val"
  } ],
  "choose_jobs" : [ "16772939480734f4abbc4-b3b9-4235-82c2-46559434cbd4" ]
}
support.huaweicloud.com/api-pipeline/RunPipeline.html