plugins/travisci: find lastBuild in the loop