Q: How to tell a job is finished with the build REST API

15 views
Skip to first unread message

martinda

unread,
Feb 2, 2021, 12:14:03 AM2/2/21
to Jenkins Developers
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
Reply all
Reply to author
Forward
0 new messages