流水线 CODEARTS PIPELINE-创建流水线模板:请求示例

时间:2023-11-28 18:59:46

请求示例

POST https://{endpoint}/v5/ce8df55870164338a72d7e828a966a2a/api/pipeline-templates

{
  "name" : "新建流水线模板-20231023215133",
  "description" : "",
  "language" : "none",
  "is_show_source" : true,
  "variables" : [ ],
  "definition" : "{\"stages\":[{\"name\":\"阶段_1\",\"sequence\":\"0\",\"jobs\":[{\"stage_id\":1698069093677,\"identifier\":\"16980691185419778b0f5-02cd-4bd3-a8cc-da825644add1\",\"name\":\"CodeCheck中文名称\",\"depends_on\":[],\"timeout\":\"\",\"timeout_unit\":\"\",\"steps\":[{\"name\":\"CodeCheck中文名称\",\"task\":\"official_devcloud_codeCheck_template\",\"sequence\":0,\"inputs\":[{\"key\":\"language\",\"value\":\"Java\"},{\"key\":\"module_or_template_id\",\"value\":\"d7dffaefb6d94c63a09cf141668356c7\"}],\"business_type\":\"Gate\",\"runtime_attribution\":\"agent\",\"identifier\":\"16980691136015f94b249-102d-44f2-abb5-02fa3ad9fae0\",\"multi_step_editable\":0,\"official_task_version\":\"0.0.1\"}],\"resource\":\"{\\\"type\\\":\\\"system\\\",\\\"arch\\\":\\\"x86\\\"}\",\"condition\":\"completed()\",\"exec_type\":\"OCTOPUS_JOB\",\"sequence\":0}],\"identifier\":\"16980690936778259e2a5-a97e-4c66-af8d-1908988c1c21\",\"pre\":[{\"task\":\"official_devcloud_autoTrigger\",\"sequence\":0}],\"post\":null,\"depends_on\":[],\"run_always\":false}]}",
  "domain_id" : "ce8df55870164338a72d7e828a966a2a",
  "is_system" : false
}
support.huaweicloud.com/api-pipeline/CreatePipelineTemplate.html