非持续集成源码构建

Method

POST

描述

非持续集成源码构建

请求参数

参数名称说明参数类型是否必填备注
ActionBuildImageFromUnCISourcestring
Version2018-03-08string
参数名称说明参数类型是否必填备注
RepositoryId镜像仓库Idlong
Source非持续构建源代码来源信息object详细信息见下表
Tagtag标签string
DockerfileDockerfile在代码托管中的全路径。比如:files/Dockerfilestring
TypeDockerfile类型,1:自动生成,2:自定义integer
MetaImageId默认dockerfile 使用默认镜像long
参数名称说明参数类型是否必填备注
CodeFrom1:git,2:svninteger
RepoUrl代码仓库urlstring
Version代码版本string
Branch需要构建镜像的代码分支string
SubDirectory子目录string
Account代码仓库账号string
Password代码仓库密码string

返回参数

无返回参数

状态码

错误码(Code)错误提示(Message)http status code说明
InvalidFormatThe format of the request body is illegal.400请求体格式非法
MissingParameterThe required input parameter %s for processing this request is not supplied.400参数 %s 缺失
ForbiddenYou have no right to access.403无权访问
InvalidParamThe parameter %s can't accept value %s400参数%s的值%s非法
ParametersErrorillegal parameters, and error code is %s.400非法参数,非法值%s
OutOfQuotaYour %s quota is up to limit.400%s配额已满

请求示例

POST https://open.cn-east-1.163yun.com/ccr?Version=2018-03-08&Action=BuildImageFromUnCISource HTTP/1.1
{
    "RepositoryId": 209,
    "Dockerfile": "Dockerfile",
    "Type": 2,
    "Tag": "latest-openapi",
    "Source": {
        "Codefrom": 1,
        "RepoUrl": "https://github.com/test/docker.git",
        "Version": "",
        "Branch": "master",
        "Account": "neteasetest@163.com",
        "Password": "test123456",
        "SubDirectory": ""
    }
}

返回示例

{
    "RequestId": "8a722cb1-a7f9-464b-8c2b-72ec8c19f3da"
}