reclient_cfgs: add download_remoteexec_cfg flag
This is to generate reproxy.cfg for every user unconditionally. But this avoids reclient_cfgs download if user don't set `download_remoteexec_cfg` gclient var. Bug: b/291868532 Change-Id: I26f136583dc8e4531b67684d398fc74378458fe6 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4812381 Reviewed-by: Junji Watanabe <jwata@google.com> Commit-Queue: Takuto Ikuta <tikuta@chromium.org> Cr-Commit-Position: refs/heads/main@{#1189345}
This commit is contained in:

committed by
Chromium LUCI CQ

parent
960236a114
commit
657cb7ae24
18
DEPS
18
DEPS
@@ -5694,9 +5694,25 @@ hooks = [
|
|||||||
},
|
},
|
||||||
# Configure remote exec cfg files
|
# Configure remote exec cfg files
|
||||||
{
|
{
|
||||||
'name': 'configure_reclient_cfgs',
|
'name': 'download_and_configure_reclient_cfgs',
|
||||||
'pattern': '.',
|
'pattern': '.',
|
||||||
'condition': 'download_remoteexec_cfg',
|
'condition': 'download_remoteexec_cfg',
|
||||||
|
'action': ['python3',
|
||||||
|
'src/buildtools/reclient_cfgs/configure_reclient_cfgs.py',
|
||||||
|
'--rbe_instance',
|
||||||
|
Var('rbe_instance'),
|
||||||
|
'--reproxy_cfg_template',
|
||||||
|
'reproxy.cfg.template',
|
||||||
|
'--rewrapper_cfg_project',
|
||||||
|
Var('rewrapper_cfg_project'),
|
||||||
|
'--download_remoteexec_cfg',
|
||||||
|
'--quiet',
|
||||||
|
],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
'name': 'configure_reclient_cfgs',
|
||||||
|
'pattern': '.',
|
||||||
|
'condition': 'not download_remoteexec_cfg',
|
||||||
'action': ['python3',
|
'action': ['python3',
|
||||||
'src/buildtools/reclient_cfgs/configure_reclient_cfgs.py',
|
'src/buildtools/reclient_cfgs/configure_reclient_cfgs.py',
|
||||||
'--rbe_instance',
|
'--rbe_instance',
|
||||||
|
@@ -151,6 +151,9 @@ def main():
|
|||||||
parser.add_argument('--cipd_prefix',
|
parser.add_argument('--cipd_prefix',
|
||||||
help='cipd package name prefix',
|
help='cipd package name prefix',
|
||||||
default='infra_internal/rbe/reclient_cfgs')
|
default='infra_internal/rbe/reclient_cfgs')
|
||||||
|
parser.add_argument('--download_remoteexec_cfg',
|
||||||
|
help='download reclient cfgs from CIPD server',
|
||||||
|
action='store_true')
|
||||||
parser.add_argument(
|
parser.add_argument(
|
||||||
'--quiet',
|
'--quiet',
|
||||||
help='Suppresses info logs',
|
help='Suppresses info logs',
|
||||||
@@ -180,6 +183,9 @@ def main():
|
|||||||
args.reproxy_cfg_template, args.rbe_instance, rbe_project):
|
args.reproxy_cfg_template, args.rbe_instance, rbe_project):
|
||||||
return 1
|
return 1
|
||||||
|
|
||||||
|
if not args.download_remoteexec_cfg:
|
||||||
|
return 0
|
||||||
|
|
||||||
logging.info('fetch reclient_cfgs for RBE project %s...' % rbe_project)
|
logging.info('fetch reclient_cfgs for RBE project %s...' % rbe_project)
|
||||||
|
|
||||||
cipd_prefix = posixpath.join(args.cipd_prefix, rbe_project)
|
cipd_prefix = posixpath.join(args.cipd_prefix, rbe_project)
|
||||||
|
Reference in New Issue
Block a user