Webhook notification: relationship between build status fields

Jean-Baptiste L's Avatar

Jean-Baptiste L

21 Dec, 2016 04:30 PM

Hello again,

I notice that there are several fields related to build status in the default webhook notification payload:
* eventName, with values build_success or build_failure * eventData.passed and eventData.failed, which look like they are XORed versions of the same information * eventData.status with values completed or failed

Which field is guaranteed to give me a failed/passed status over the build?

Thanks, kind regards,
-- JB.L

  1. 1 Posted by Ilya Finkelshte... on 22 Dec, 2016 01:17 AM

    Ilya Finkelshteyn's Avatar

    You can use any of those values. However to be precisely correct, here is how they formed:

    eventData.passed -- build status is not failed

    eventData.failed -- build status is failed

    eventName.build_success -- build status is not failed

    eventName.build_failure -- build status is failed

    eventData.status.completed -- build status is success

    eventData.status.failed -- build status is not success

    All possible build statuses are:
    queued running success failed cancelling cancelled

    However this can be safely ignored as notification never called on statuses other than success or failed.

    Thanks!
    Ilya.

  2. 2 Posted by Jean-Baptiste L on 22 Dec, 2016 08:28 AM

    Jean-Baptiste L's Avatar

    Hi Ilya, thank you for your detailed answer, this is exactly what I needed.

    Do you know if there are any future plans to send notifications on build queue / start / cancel?

    Thanks!
    -- J.B

  3. 3 Posted by Ilya Finkelshte... on 22 Dec, 2016 11:36 AM

    Ilya Finkelshteyn's Avatar

    Hi Jean-Baptiste,

    Sorry, I am not aware about plans like this. Please feel free to add this as issue here.

    Ilya.

  4. Ilya Finkelshteyn closed this discussion on 25 Aug, 2018 02:10 AM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac