gce_au_worker: Use internal IP to connect to DUTs when on GCE
This is to unblock the move of lakitu builders onto GCE. gce_au_worker
now uses the DUT's internap IP address to connect, such that the
connection won't be blocked by any firewall.
To make this not break the existing workflow, i.e., using baremetal
builders, a compat logic is added. When it detects that it's not run
from GCE, it will fall back to creating a static external IP address,
and using that to connect.
TEST=GCETestStage (of lakitu-pre-cq) passes on both baremetal and GCE.
Commit-Ready: Daniel Wang <firstname.lastname@example.org>
Tested-by: Daniel Wang <email@example.com>
Reviewed-by: Don Garrett <firstname.lastname@example.org>
1 file changed