build components

Basic Information

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

请求路径

  1. POST /openapi/v1/teams/{team_id}/regions/{region_name}/apps/{app_id}/services/{service_id}/build

Body 请求体示例

  1. {
  2. "build_type": "source_code",
  3. "server_type": "svn",
  4. "branch": "master",
  5. "repo_url": "string",
  6. "username": "string",
  7. "password" : "string"
  8. }

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

  1. {
  2. "build_type": "source_code",
  3. "server_type": "svn",
  4. "branch": "master",
  5. "repo_url": "string",
  6. "username": "string",
  7. "password" : "string"
  8. }

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

  1. {
  2. "event_id": "string"
  3. }

Attributes

nametyperequiredconstraintChinese nameillustrate
event_idstringtruenoneEvent idEvent ID