Fix race condition in e2e test script

The build detection relied on looking up the build ID immediately
after a webhook simulation, and then repeatedly querying that build
for status. If the ID lookup beats the build record creation, the
script will time out looking for a nil build.

Look at the build list for status instead to eliminate the race.