云服务器内容精选

  • 响应示例 状态码: 200 OK { "result" : { "steps" : [ { "properties" : { "image" : "maven3.5.3-jdk8-open", "snapshotArtifact" : { "displayName" : "", "value" : "" }, "userPrivateRepositories" : [ ], "deal" : "notDeal", "dependencyCheckParam" : " ", "userPublicRepositories" : [ ], "settingMode" : "auto", "doCheck" : "disable", "junitCoverageSwitch" : false, "coverageReportPath" : "**/site/jacoco", "releaseArtifact" : { "displayName" : "", "value" : "" }, "cacheOption" : "cached", "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", "file" : "**/TEST*.xml", "dependencyProjectDir" : "./", "ignoreTest" : false, "pomMode" : "no", "dependencySettings" : "~/.m2/settings.xml" }, "module_id" : "devcloud2018.codeci_action_20043.action", "name" : "Maven构建", "version" : null, "enable" : true }, { "properties" : { "image" : "shell4.2.46-git1.8.3-zip6.00", "buildVersion" : "", "file" : "**/target/*.?ar", "groupId" : "", "name" : "" }, "module_id" : "devcloud2018.codeci_action_20018.action", "name" : "上传软件包到软件发布库", "version" : null, "enable" : true } ], "arch" : "x86-64", "project_id" : "a287e712be6c404ca26e5f69040fa12b", "job_name" : "oychap213i2", "job_id" : "35b6c7da9e644dbbb7e333579f89dcda", "auto_update_sub_module" : "false", "flavor" : "2u8g", "parameters" : [ { "name" : "hudson.model.StringParameterDefinition", "params" : [ { "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", "limits" : null } ] } ], "scms" : [ { "branch" : "master", "url" : "git@codehub.devcloud.cn-north-7.ulanqab.huawei.com:soso-test00001/an.git", "is_auto_build" : false, "scm_type" : "codehub", "end_point_id" : null, "web_url" : "https://devcloud.cn-north-7.ulanqab.huawei.com/codehub/2111746211/home", "source" : null, "build_type" : "branch", "depth" : "1", "repo_id" : "2111746211" } ], "host_type" : "devcloud" }, "error" : null, "status" : "success" }
  • 响应参数 状态码: 400 表4 响应Body参数 参数 参数类型 描述 error_code String 错误码 error_msg String 错误描述 状态码: 401 表5 响应Body参数 参数 参数类型 描述 error_code String 错误码 error_msg String 错误描述 状态码: 403 表6 响应Body参数 参数 参数类型 描述 error_code String 错误码 error_msg String 错误描述 状态码: 404 表7 响应Body参数 参数 参数类型 描述 error_code String 错误码 error_msg String 错误描述 状态码: 500 表8 响应Body参数 参数 参数类型 描述 error_code String 错误码 error_msg String 错误描述
  • 响应示例 状态码: 200 OK { "total" : 1, "jobs" : [ { "id" : "2a86c3c1ed18416399279fe6........", "job_name" : "demo", "job_creator" : "ae22fd035f354cfa8d82a3f1........", "user_name" : "test", "last_build_time" : 1608004535000, "health_score" : 75, "source_code" : "test", "last_build_status" : "blue", "is_finished" : true, "disabled" : true, "favorite" : true, "is_modify" : true, "is_delete" : true, "is_execute" : true, "is_copy" : true, "is_forbidden" : true, "is_view" : true } ] }
  • 响应参数 状态码: 200 表4 响应Body参数 参数 参数类型 描述 jobs Array of Job objects 任务列表 total Integer 任务总数 表5 Job 参数 参数类型 描述 id String 任务ID job_name String 任务名称 job_creator String 任务创建者 user_name String 用户名称 last_build_time Number 最新执行时间 health_score Integer 健康分值 source_code String 代码来源 last_build_status String 最新构建状态 is_finished Boolean 是否已结束 disabled Boolean 是否已禁用 favorite Boolean 是否已收藏 is_modify Boolean 是否有修改任务权限 is_delete Boolean 是否有删除任务权限 is_execute Boolean 是否有执行任务权限 is_copy Boolean 是否有复制任务权限 is_forbidden Boolean 是否有禁用任务权限 is_view Boolean 是否有查看任务权限 状态码: 400 表6 响应Body参数 参数 参数类型 描述 error_code String 错误码 error_msg String 错误描述 状态码: 401 表7 响应Body参数 参数 参数类型 描述 error_code String 错误码 error_msg String 错误描述 状态码: 403 表8 响应Body参数 参数 参数类型 描述 error_code String 错误码 error_msg String 错误描述 状态码: 404 表9 响应Body参数 参数 参数类型 描述 error_code String 错误码 error_msg String 错误描述 状态码: 500 表10 响应Body参数 参数 参数类型 描述 error_code String 错误码 error_msg String 错误描述
  • URI GET /v3/{project_id}/jobs 表1 路径参数 参数 是否必选 参数类型 描述 project_id 是 String CodeArts项目ID,32位数字、小写字母组合。 表2 Query参数 参数 是否必选 参数类型 描述 page_index 是 Integer 分页页码, 表示从此页开始查询, page_index大于等于0 page_size 是 Integer 每页显示的条目数量,page_size小于等于100