I poll builds with the REST API to detect their completion and I used to look at the "result" field to detect both the end of the build and the build status.
I noticed in Jenkins 2.277 that the result quickly changes from SUCCESS to FAILURE towards the end of the build (as polled from the build rest api).
So what is the correct way to detect the end of a build when polling? I wanted to look at the "building" field, but it can be false when the build starts, so that's not a good indication.
Any idea how to do this reliably?
Thanks,
Martin d'Anjou