{"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"}}},"CreateBuildJobSteps":{"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","name"],"type":"object"},"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"},"CreateTemplatesItems":{"properties":{"create_time":{"description":"创建时间","example":"2023-11-08T14:27:26.796+00:00","type":"string"},"description":{"description":"模板说明","example":"example_description","type":"string"},"domain_id":{"description":"domainId","example":"60056bab32fd450aa265b89428f425e06","type":"string"},"domain_name":{"description":"domain名字","example":"example_name","type":"string"},"favourite":{"description":"是否收藏模板","example":true,"type":"boolean"},"i18n":{"description":"i18n","example":"i18n","type":"object"},"id":{"description":"数据库中id","example":"654b9ace9da6c9407793a936","type":"string"},"intl_description":{"description":"intl说明","example":"example_description","type":"object"},"name":{"description":"模板命名","example":"example_name","type":"string"},"parameters":{"description":"构建执行参数列表","items":{"$ref":"#/definitions/CreateBuildJobParameter"},"type":"array"},"public":{"description":"模板是否公开","example":"true","type":"boolean"},"scope":{"description":"模板范围,自定义模板默认为custom","example":"custom","type":"string"},"template":{"$ref":"#/definitions/QueryTemplate","description":"构建步骤模板,需封装为驼峰式命名","example":"{\n \"actions\": [],\n \"autoUpdateSubModule\": false,\n \"image\": null,\n \"imageSource\": null,\n \"Steps\": [\n {\n \"region\": null,\n \"language\": null,\n \"version\": null,\n \"name\": \"Maven构建\",\n \"propertiesVersion\": null,\n \"enable\": true,\n \"module_id\": \"devcloud2018.codeci_action_20043.action\",\n \"Properties\": {\n \"image\": \"maven3.5.3-jdk8-open\",\n \"snapshotArtifact\": {\n \"displayName\": \"\",\n \"value\": \"\"\n },\n \"userPrivateRepositories\": [],\n \"deal\": \"notDeal\",\n \"dependencyCheckParam\": \" \",\n \"userPublicRepositories\": [],\n \"settingMode\": \"auto\",\n \"doCheck\": \"disable\",\n \"junitCoverageSwitch\": \"false\",\n \"coverageReportPath\": \"**/site/jacoco\",\n \"releaseArtifact\": {\n \"displayName\": \"\",\n \"value\": \"\"\n },\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 \"file\": \"**/TEST*.xml\",\n \"dependencyProjectDir\": \"./\",\n \"ignoreTest\": \"false\",\n \"pomMode\": \"no\",\n \"dependencySettings\": \"~/.m2/settings.xml\"\n }\n }\n","type":"object"},"tool_type":{"description":"构建工具类型,yaml构建还是action构建","example":"yaml","type":"string"},"type":{"description":"模板类别","example":"codeci","type":"string"},"user_id":{"description":"用户id","example":"ae22fd035f354cfa8d82d3f1cdad0446","type":"string"},"user_name":{"description":"用户名","example":"devcloud_123","type":"string"},"uuid":{"description":"uuid","example":"96f24b5675864a37ba1d2b776d86d000","type":"string"},"weight":{"description":"权重","example":"0.0","format":"double","type":"number"}},"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"},"CreateTemplatesResponseBody":{"description":"创建模板接口返回体","properties":{"error":{"description":"返回错误信息","example":"error_message","type":"string"},"result":{"$ref":"#/definitions/CreateTemplatesItems","description":"查询模板结果"},"status":{"description":"返回状态信息","example":"success","type":"string"}},"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"}}},"QueryTemplate":{"description":"模板中构建执行步骤列表","properties":{"steps":{"description":"构建执行的步骤","items":{"$ref":"#/definitions/CreateBuildJobSteps"},"type":"array"}},"required":["steps"],"type":"object"}},"description":null,"group_id":"50626d0f704e4af3adfd875e2acffcb6","host":"cloudbuild-ext.cn-north-4.myhuaweicloud.com","id":"cb4bc8cc84c14a1daed695a06fb33773","info_version":"v3","method":"post","name":"CreateTemplates","parameters":{"X-Auth-Token":{"description":"用户Token。\n通过调用IAM服务接口获取\n(响应消息头中X-Subject-Token的值)。\n不支持租户全局token,请使用scope为project的region级token。","in":"header","maxLength":100000,"minLength":1,"name":"X-Auth-Token","required":true,"type":"string","x-example":"MIIDkgYJKoZIhvcNAQcCoIIDgzCCXXXXX..."}},"paths":{"/v3/templates/create":{"post":{"deprecated":false,"description":"创建构建模板","operationId":"CreateTemplates","parameters":[{"$ref":"#/parameters/X-Auth-Token"},{"description":"body","in":"body","name":"CreateTemplatesRequestBody","required":true,"schema":{"$ref":"#/definitions/CreateTemplatesRequestBody"}}],"produces":["application/json;charset=UTF-8"],"responses":{"200":{"description":"OK","examples":{"application/json":{"error":null,"result":{"create_time":"2023-11-25T08:39:42.098+00:00","description":"123","domain_id":"60021bab32fd450aa2cb89226f425e06","domain_name":"devcloud_codeci_z00485259_02","favourite":false,"i18n":{},"id":"6561b2ced7a6751941fdc8cd","intl_description":{},"name":"oych_test_temp_ladadad12122313","parameters":[{"name":"hudson.model.StringParameterDefinition","params":[{"limits":null,"name":"name","value":"codeBranch"},{"limits":null,"name":"type","value":"normalparam"},{"limits":null,"name":"defaultValue","value":"master"},{"limits":null,"name":"description","value":"代码分支,系统预定义参数"},{"limits":null,"name":"deletion","value":"false"},{"limits":null,"name":"defaults","value":"true"},{"limits":null,"name":"staticVar","value":"false"},{"limits":null,"name":"sensitiveVar","value":"false"}]}],"public":true,"scope":"custom","template":{"steps":null},"type":"codeci","user_id":"ae22fd035f354cfa8d82a3f1c8940446","user_name":"devcloud_codeci_z00485259_02","uuid":"2d9031c079624376824fe1e2731615dc","weight":0},"status":"success"}},"schema":{"$ref":"#/definitions/CreateTemplatesResponseBody"}},"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":["CodeArtsBuild"],"x-api-type":"open-api","x-apigateway-ratelimit":"cloudbuild_ext","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}/v3/templates/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"}