Updated on 2025-09-25 GMT+08:00

Updating a Build Job

Function

This API is used to update a build job based on the build job ID.

URI

PUT /assembling/v1/jobs/{job_id}

Table 1 describes the parameters.

Table 1 Path parameters

Parameter

Mandatory

Type

Description

job_id

Yes

String

Build job ID. See Obtaining the Build Job List Based on the Component Name.

Request

Table 2 Request header parameters

Parameter

Mandatory

Type

Description

Content-Type

Yes

String

Message body type (format). Default value: application/json;charset=utf8.

X-Auth-Token

Yes

String

API calling can be authenticated using a token or AK/SK. If you use a token, this parameter is mandatory and must be set to the token. For details about how to obtain a token, see Obtaining a User Token.

Table 3 Request body parameters

Parameter

Mandatory

Type

Description

job_name

Yes

String

Build job name.

The value contains 2 to 64 characters consisting of letters, digits, hyphens (-), and underscores (_). It starts with a letter and ends with a letter or digit. Letters are case insensitive.

job_description

No

String

Build job description.

The value can contain up to 64 characters.

environment_setting

Yes

Object

Build environment information. See Table 4.

code_repo

No

Object

Build repository information. See Table 6.

enterprise_project_id

No

String

Enterprise project ID.

Table 4 Build environment information

Parameter

Mandatory

Type

Description

docker_version

No

String

Version of the Docker image to be built.

cluster_id

No

String

ID of the CCE cluster used for build.

use_public_cluster

No

bool

Whether to use a public cluster. Value: true or false.

cluster_name

No

String

Name of the CCE cluster used for build.

build_os

No

Object

Build architecture type. See Table 5.

Table 5 Build architecture type

Parameter

Mandatory

Type

Description

arch

No

String

Build architecture type. Value: x86_64 or aarch64.

Table 6 Build repository information

Parameter

Mandatory

Type

Description

type

Yes

String

Repository type, for example, Gitlab or Github.

url

Yes

String

Repository address.

branch

Yes

String

Branch.

namespace

Yes

String

Organization.

Response

None

Example Request

None

Example Response

None

Status Code

Status Code

Description

200

OK

400

Bad Request

Error Code

The error code format is SVCSTG.CPE.[Error_ID], for example, SVCSTG.CPE.5004401. For details, see ServiceStage Error Codes.