{"base_path":"/","components":null,"consumes":"","definitions":{"CreateBuildJobParameter":{"description":"创建构建作业参数","properties":{"name":{"description":"参数定义名,默认为hudson.model.StringParameterDefinition","example":"hudson.model.StringParameterDefinition","type":"string"},"params":{"description":"构建执行参数子参数","items":{"$ref":"#/definitions/CreateBuildJobParameterParam"},"type":"array"}}},"CreateBuildJobParameterParam":{"description":"构建执行参数子参数","properties":{"limits":{"description":"枚举类参数限制","items":{"$ref":"#/definitions/LimitsParam"},"type":"array"},"name":{"description":"参数字段名","example":"name","type":"string"},"value":{"description":"参数字段值","example":"codeBranch","type":"string"}}},"CreateTemplate":{"description":"模板中构建执行步骤列表","properties":{"steps":{"description":"构建执行的步骤","items":{"$ref":"#/definitions/CreateTemplateSteps"},"type":"array"}},"required":["steps"],"type":"object"},"CreateTemplateSteps":{"description":"构建执行的步骤,采用驼峰式命名","example":"{ \"Properties\": {\n \"image\": \"maven3.5.3-jdk8-open\",\n \"settingMode\": \"auto\",\n \"userPublicRepositories\": [],\n \"userPrivateRepositories\": [],\n \"pomMode\": \"no\",\n \"releaseArtifact\": {\n \"displayName\": \"\",\n \"value\": \"\"\n },\n \"snapshotArtifact\": {\n \"displayName\": \"\",\n \"value\": \"\"\n },\n \"deal\": \"notDeal\",\n \"ignoreTest\": false,\n \"file\": \"**/TEST*.xml\",\n \"junitCoverageSwitch\": false,\n \"coverageReportPath\": \"**/site/jacoco\",\n \"cacheOption\": \"cached\",\n \"command\": \"# 功能: 打包\\n# 参数说明:\\n#\\t\\t-Dmaven.test.skip=true:跳过单元测试\\n#\\t\\t-U:每次构建检查依赖更新,可避免缓存中快照版本依赖不更新问题,但会牺牲部分性能\\n#\\t\\t-e -X :打印调试信息,定位疑难构建问题时建议使用此参数构建\\n#\\t\\t-B:以batch模式运行,可避免日志打印时出现ArrayIndexOutOfBoundsException异常\\n# 使用场景: 打包项目且不需要执行单元测试时使用\\nmvn package -Dmaven.test.skip=true -U -e -X -B\\n\\n#功能:打包;执行单元测试,但忽略单元测试用例失败,每次构建检查依赖更新\\n#使用场景: 需要执行单元测试,且使用构建提供的单元测试报告服务统计执行情况\\n# 使用条件:在”单元测试“中选择处理单元测试结果,并正确填写测试结果文件路径\\n#mvn package -Dmaven.test.failure.ignore=true -U -e -X -B\\n\\n#功能:打包并发布依赖包到私有依赖库\\n#使用场景: 需要将当前项目构建结果发布到私有依赖仓库以供其它maven项目引用时使用\\n#注意事项: 此处上传的目标仓库为CodeArts私有依赖仓库,注意与软件发布仓库区分\\n#mvn deploy -Dmaven.test.skip=true -U -e -X -B\",\n \"doCheck\": \"disable\",\n \"dependencyProjectDir\": \"./\",\n \"dependencySettings\": \"~/.m2/settings.xml\",\n \"dependencyCheckParam\": \" \"\n}, \"module_id\": \"devcloud2018.codeci_action_20043.action\", \"name\": \"Maven构建\", \"version\": \"20231001.6\", \"enable\": true },\n","properties":{"enable":{"description":"是否开启","example":true,"type":"boolean"},"module_id":{"description":"构建模块id","example":"devcloud2018.codeci_action_20043.action","type":"string"},"name":{"description":"构建模块名称","example":"Maven构建","type":"string"},"properties":{"additionalProperties":{"type":"object"},"description":"具体的构建步骤","example":"\"image\": \"maven3.5.3-jdk8-open\",\n \"settingMode\": \"auto\",\n \"userPublicRepositories\": [],\n \"userPrivateRepositories\": [],\n \"pomMode\": \"no\",\n \"releaseArtifact\": {\n \"displayName\": \"\",\n \"value\": \"\"\n },\n \"snapshotArtifact\": {\n \"displayName\": \"\",\n \"value\": \"\"\n },\n \"deal\": \"notDeal\",\n \"ignoreTest\": false,\n \"file\": \"**/TEST*.xml\",\n \"junitCoverageSwitch\": false,\n \"coverageReportPath\": \"**/site/jacoco\",\n \"cacheOption\": \"cached\",\n \"command\": \"# 功能: 打包\\n# 参数说明:\\n#\\t\\t-Dmaven.test.skip=true:跳过单元测试\\n#\\t\\t-U:每次构建检查依赖更新,可避免缓存中快照版本依赖不更新问题,但会牺牲部分性能\\n#\\t\\t-e -X :打印调试信息,定位疑难构建问题时建议使用此参数构建\\n#\\t\\t-B:以batch模式运行,可避免日志打印时出现ArrayIndexOutOfBoundsException异常\\n# 使用场景: 打包项目且不需要执行单元测试时使用\\nmvn package -Dmaven.test.skip=true -U -e -X -B\\n\\n#功能:打包;执行单元测试,但忽略单元测试用例失败,每次构建检查依赖更新\\n#使用场景: 需要执行单元测试,且使用构建提供的单元测试报告服务统计执行情况\\n# 使用条件:在”单元测试“中选择处理单元测试结果,并正确填写测试结果文件路径\\n#mvn package -Dmaven.test.failure.ignore=true -U -e -X -B\\n\\n#功能:打包并发布依赖包到私有依赖库\\n#使用场景: 需要将当前项目构建结果发布到私有依赖仓库以供其它maven项目引用时使用\\n#注意事项: 此处上传的目标仓库为CodeArts私有依赖仓库,注意与软件发布仓库区分\\n#mvn deploy -Dmaven.test.skip=true -U -e -X -B\",\n \"doCheck\": \"disable\",\n \"dependencyProjectDir\": \"./\",\n \"dependencySettings\": \"~/.m2/settings.xml\",\n \"dependencyCheckParam\": \" \"\n","type":"object"},"version":{"description":"构建版本","example":20231001.6,"type":"string"}},"required":["module_id"],"type":"object"},"CreateTemplatesRequestBody":{"description":"创建作业模板接口请求体","properties":{"description":{"description":"模板说明","example":"This is a description","type":"string"},"name":{"description":"模板命名","example":"example_name","type":"string"},"parameters":{"description":"构建执行参数列表","items":{"$ref":"#/definitions/CreateBuildJobParameter"},"type":"array"},"template":{"$ref":"#/definitions/CreateTemplate","description":"构建步骤模板,需封装为驼峰式命名"},"tool_type":{"description":"工具类型","example":"example_tool_type","type":"string"}},"required":["template","name"],"type":"object"},"ErrorResponseBody":{"properties":{"error_code":{"description":"错误码","example":"CB.00060200","type":"string"},"error_msg":{"description":"错误描述","example":"Invalid param","type":"string"}},"type":"object"},"LimitsParam":{"description":"枚举类参数限制","properties":{"disable":{"description":"是否生效,默认为\"0\",为生效状态","type":"string"},"display_name":{"description":"参数展示的名字","type":"string"},"name":{"description":"参数名字","type":"string"}}},"StatusSuccessResultWithUUID":{"properties":{"result":{"description":"结果","properties":{"uuid":{"description":"uuid","type":"string"}},"type":"object"},"status":{"description":"任务运行结果","example":"success","type":"string"}},"title":"StatusSuccessResultWithUUID","type":"object"}},"description":null,"group_id":"50626d0f704e4af3adfd875e2acffcb6","host":"cloudbuild-ext.cn-north-4.myhuaweicloud.com","id":"864d0c02be604c72b0370c49e2857a10","info_version":"v3","method":"post","name":"CreateTemplate","parameters":{},"paths":{"/v1/template/create":{"post":{"deprecated":false,"description":"创建构建模板","operationId":"CreateTemplate","parameters":[{"description":"body","in":"body","name":"CreateTemplateRequestBody","required":true,"schema":{"$ref":"#/definitions/CreateTemplatesRequestBody"}}],"produces":["application/json;charset=UTF-8"],"responses":{"200":{"description":"OK","examples":{"application/json":{"error":null,"result":{"uuid":"77176fe3a02c4a49af822360760a607d"},"status":"success"}},"schema":{"$ref":"#/definitions/StatusSuccessResultWithUUID"}},"400":{"description":"Bad Request","schema":{"$ref":"#/definitions/ErrorResponseBody"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/ErrorResponseBody"}},"403":{"description":"Forbidden","schema":{"$ref":"#/definitions/ErrorResponseBody"}},"404":{"description":"Not Found","schema":{"$ref":"#/definitions/ErrorResponseBody"}},"500":{"description":"Internal Server Error","schema":{"$ref":"#/definitions/ErrorResponseBody"}}},"security":[{"apig-auth-iam":[]}],"summary":"创建构建模板","tags":["TemplateManager"],"x-api-type":"open-api","x-apigateway-ratelimit":"five_50_min","x-internel":"false","x-is-registered":"Y","x-request-examples-text-1":"{\n \"name\": \"example\",\n \"description\": \"123\",\n \"tool_type\": \"123123\",\n \"template\": {\n \"steps\": [\n {\n \"module_id\": \"devcloud2018.codeci_action_20043.action\",\n \"name\": \"Maven构建\",\n \"enable\": true,\n \"properties\": null\n }\n ]\n },\n \"parameters\": [\n {\n \"name\": \"hudson.model.StringParameterDefinition\",\n \"params\": [\n {\n \"name\": \"name\",\n \"value\": \"codeBranch\"\n },\n {\n \"name\": \"type\",\n \"value\": \"normalparam\"\n },\n {\n \"name\": \"defaultValue\",\n \"value\": \"master\"\n },\n {\n \"name\": \"description\",\n \"value\": \"description\"\n },\n {\n \"name\": \"deletion\",\n \"value\": \"false\"\n },\n {\n \"name\": \"defaults\",\n \"value\": \"true\"\n },\n {\n \"name\": \"staticVar\",\n \"value\": \"false\"\n },\n {\n \"name\": \"sensitiveVar\",\n \"value\": \"false\"\n }\n ]\n }\n ]\n}","x-request-examples-url-1":"POST https://{endpoint}/v1/template/create","x-support-sdk":"Y"}}},"product_short":"CodeArtsBuild","region_id":"cn-north-4","schemes":["HTTPS"],"security_definitions":{"APP":{"in":"header","name":"Authorization","type":"apiKey","x-apigateway-auth-type":"AppSigv1"},"apig-auth-app-optional":{"in":"header","name":"Authorization","type":"apiKey","x-apigateway-auth-opt":{"access-auth-type":"optional"},"x-apigateway-auth-type":"AppSigv1"},"apig-auth-iam":{"in":"header","name":"unused","type":"apiKey","x-apigateway-auth-type":"IAM"},"apig-auth-iam-none":{"in":"header","name":"unused","type":"apiKey","x-apigateway-auth-type":"IAM_NONE"}},"summary":"创建构建模板","tags":"模板管理","uri":null,"version":"2.0"}