Deze pagina is nog niet beschikbaar in uw eigen taal. We werken er hard aan om meer taalversies toe te voegen. Bedankt voor uw steun.
Execute the build job.
Function
Run the build task command to transfer user-defined parameters.
Calling Method
For details, see Calling APIs.
URI
POST /v3/jobs/build
Request Parameters
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
X-Auth-Token |
Yes |
String |
User token. Obtain the value by calling the IAM service interface. (value of X-Subject-Token in the response header). Global tenant tokens are not supported. Use a region-level token whose scope is project. |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
job_id |
Yes |
String |
build task ID, which is a string of 32 characters consisting of digits and letters at the end of the browser URL when the build task is edited. |
parameter |
No |
Array of ParameterItem objects |
User-defined parameter |
scm |
No |
Scm object |
Code Information |
Response Parameters
Status code: 200
Parameter |
Type |
Description |
---|---|---|
octopus_job_name |
String |
Temporary Task Name |
actual_build_number |
String |
Actual Build Times |
daily_build_number |
String |
Build Daily No. |
Status code: 400
Parameter |
Type |
Description |
---|---|---|
error_code |
String |
Error Codes |
error_msg |
String |
Description |
Status code: 401
Parameter |
Type |
Description |
---|---|---|
error_code |
String |
Error Codes |
error_msg |
String |
Description |
Status code: 403
Parameter |
Type |
Description |
---|---|---|
error_code |
String |
Error Codes |
error_msg |
String |
Description |
Status code: 404
Parameter |
Type |
Description |
---|---|---|
error_code |
String |
Error Codes |
error_msg |
String |
Description |
Status code: 500
Parameter |
Type |
Description |
---|---|---|
error_code |
String |
Error Codes |
error_msg |
String |
Description |
Example Requests
Execute the build task whose task ID is f9d6c8466d614a9788e9a0acf6c15f46, code repository name is codeBranch, and code repository branch is master.
POST https://{endpoint}/v3/jobs/build { "job_id" : "f9d6c8466d614a9788e9a0acf6c15f46", "parameter" : [ { "name" : "codeBranch", "value" : "master" } ], "scm" : { "build_tag" : null, "build_commit_id" : "build_commit_id" } }
Example Responses
Status code: 200
OK
{ "octopus_job_name" : "j_Oaqg...", "actual_build_number" : "20", "daily_build_number" : "20200612.20" }
Status Codes
Status Code |
Description |
---|---|
200 |
OK |
400 |
Bad Request |
401 |
Unauthorized |
403 |
Forbidden |
404 |
Not Found |
500 |
Internal Server Error |
Error Codes
See Error Codes.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.