Skip to main content

build components

Basic Information

This interface is mainly used to build components for CI/CD workflow calls

请求路径
POST /openapi/v1/teams/{team_id}/regions/{region_name}/apps/{app_id}/services/{service_id}/build
Body 请求体示例
{
"build_type": "source_code",
"server_type": "svn",
"branch": "master",
"repo_url": "string",
"username": "string",
"password" : "string"
}

request parameters

nameLocationtyperequiredChinese nameillustrate
team_idpathstringYesTeam ID, name
region_namepathstringYesdata center name
app_idpathintegerYesapplication group id
service_idpathstringYescomponent ID
bodybodyComponentBuildReqSerializersnonone

return result

status codeStatus code meaningillustratedata model
200OKsuccessComponentEventSerializers

Model

ComponentBuildReqSerializers

{
"build_type": "source_code",
"server_type": "svn",
"branch": "master",
"repo_url": "string",
"username": "string",
"password" : "string"
}

Attributes

nametyperequiredconstraintChinese nameillustrate
build_typestring¦nullfalsenoneBuild typeComponent build source type
server_typestring¦nullfalsenoneServer typeSource source type
branchstring¦nullfalsenoneBranchCode branch, tag information
repo_urlstring¦nullfalsenoneRepo urlSource repository service address, including code repository, mirror repository, and OSS address
usernamestring¦nullfalsenoneUsernameSource warehouse service account
passwordstring¦nullfalsenonePasswordSource warehouse service password

enumeration value

Attributesvalue
build_typesource_code
build_typedocker_image
build_typemarket
server_typesvn
server_typegit
server_typeoss

ComponentEventSerializers

{
"event_id": "string"
}

Attributes

nametyperequiredconstraintChinese nameillustrate
event_idstringtruenoneEvent idEvent ID