autoninja: make it possible to skip external account check

This is for some internal infrastructures which want to use service
accounts from corp machines.

Bug: b/320639792
Change-Id: Ie90241fe89e0bb0fb5526844e2e3651cc316d945
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5226384
Reviewed-by: Fumitoshi Ukai <ukai@google.com>
Commit-Queue: Takuto Ikuta <tikuta@chromium.org>
Reviewed-by: Richard Wang <richardwa@google.com>
Auto-Submit: Takuto Ikuta <tikuta@chromium.org>
changes/84/5226384/6
Takuto Ikuta 1 year ago committed by LUCI CQ
parent 6fc0c97ab2
commit 3a7f62489a

@ -102,6 +102,14 @@ def _is_google_corp_machine():
def _is_google_corp_machine_using_external_account(): def _is_google_corp_machine_using_external_account():
if os.environ.get("AUTONINJA_SKIP_EXTERNAL_ACCOUNT_CHECK") == "1":
print(
"WARNING: AUTONINJA_SKIP_EXTERNAL_ACCOUNT_CHECK env var is set.\n"
"This is only for some infra, do not set this in personal"
" development machine.",
file=sys.stderr)
return False
if not _is_google_corp_machine(): if not _is_google_corp_machine():
return False return False

Loading…
Cancel
Save