流水线 CODEARTS PIPELINE-创建规则:请求示例

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

请求示例

POST https://{endpoint}/v2/ce8df55870164338a72d7e828a966a2a/rules/create

{
  "name" : "新建规则-20231020170337",
  "type" : "Build",
  "plugin_id" : "official_devcloud_cloudBuild",
  "plugin_name" : "official_devcloud_cloudBuild",
  "plugin_version" : "0.0.15",
  "layout_content" : "layout_content",
  "content" : [ {
    "group_name" : "MavenUnitTest",
    "properties" : [ {
      "key" : "build.PassRatio",
      "name" : "PassRatio",
      "type" : "judge",
      "operator" : "=",
      "value_type" : "float",
      "value" : "0.1"
    }, {
      "key" : "build.TotalCases",
      "name" : "TotalCases",
      "type" : "judge",
      "operator" : "=",
      "value_type" : "float",
      "value" : "0.1"
    }, {
      "key" : "build.CoverageRatio",
      "name" : "CoverageRatio",
      "type" : "judge",
      "operator" : "=",
      "value_type" : "float",
      "value" : "0.1"
    } ]
  } ]
}
support.huaweicloud.com/api-pipeline/CreateRule.html