Add a build completed request to the Bitrise API


#1

Description of the feature request

There is currently a ’ https://api-docs.bitrise.io/#/builds/build-abort’ endpoint to tell the build to abort
I suggest another endpoint to report that a build was Successfully Completed i.e:
https://api-docs.bitrise.io/#/builds/completed

Use case / for what or how I would use it

I have personally ran into the situation where I have a long running task(Vpn connection), where I at the end check if everything worked out, want to tell the bitrise machine it can shutdown and show a ‘Completed’ status on the last run machine rather than Cancelled


#2

Hey @service! :wave:

You can call the abort endpoint (https://api-docs.bitrise.io/#/builds/build-abort) with "abort_with_success": true to terminate the build with “success” status.

Is that what you were looking for or I misunderstood your request?


#3

@viktorbenei This is already what we are doing, but the status it ends up with is “Cancelled” in the build queue. We would like it to become green

Extract from curl:
=> Send header, 296 bytes (0x128)
0000: POST /v0.1/apps/****/builds/*****/abort H
0040: TTP/1.1
0049: Host: api.bitrise.io
005f: User-Agent: curl/7.54.0
0078: Accept: /
0085: Content-Type: application/json
00a5: Authorization: token *****
0112: Content-Length: 96
0126:
=> Send data, 96 bytes (0x60)
0000: {“abort_reason”: “Build was completed”, “abort_with_success”: tr
0040: ue, “skip_notifications”: true }


#4

Hi @service!

Can you provide a bit more detail on your use case? If I understand correctly, you would like to manually stop a build but still make it have a green “success” state, correct?


#5

@bitce You have understood correctly


#6

What’s the use case for that? :thinking: Just curious.


#7

Wrote it in the opening post :slight_smile: