| Index: git_cl.py
|
| diff --git a/git_cl.py b/git_cl.py
|
| index de80a9f367aefbf92ee5584df1d61cecce4762e3..7d57dd0d851033bbcdb4cf8ee9ece1026d185846 100755
|
| --- a/git_cl.py
|
| +++ b/git_cl.py
|
| @@ -39,6 +39,7 @@ from third_party import colorama
|
| from third_party import httplib2
|
| from third_party import upload
|
| import auth
|
| +from luci_hacks import trigger_luci_job as luci_trigger
|
| import breakpad # pylint: disable=W0611
|
| import clang_format
|
| import dart_format
|
| @@ -238,6 +239,17 @@ def _prefix_master(master):
|
| return '%s%s' % (prefix, master)
|
|
|
|
|
| +def trigger_luci_job(changelist, masters, options):
|
| + """Send a job to run on LUCI."""
|
| + issue_props = changelist.GetIssueProperties()
|
| + issue = changelist.GetIssue()
|
| + patchset = changelist.GetMostRecentPatchset()
|
| + for builders_and_tests in sorted(masters.itervalues()):
|
| + for builder in sorted(builders_and_tests.iterkeys()):
|
| + luci_trigger.trigger(
|
| + builder, 'HEAD', issue, patchset, issue_props['project'])
|
| +
|
| +
|
| def trigger_try_jobs(auth_config, changelist, options, masters, category):
|
| rietveld_url = settings.GetDefaultServerUrl()
|
| rietveld_host = urlparse.urlparse(rietveld_url).hostname
|
| @@ -3084,6 +3096,7 @@ def CMDtry(parser, args):
|
| group.add_option(
|
| "-m", "--master", default='',
|
| help=("Specify a try master where to run the tries."))
|
| + group.add_option( "--luci", action='store_true')
|
| group.add_option(
|
| "-r", "--revision",
|
| help="Revision to use for the try job; default: the "
|
| @@ -3215,7 +3228,9 @@ def CMDtry(parser, args):
|
| '\nWARNING Mismatch between local config and server. Did a previous '
|
| 'upload fail?\ngit-cl try always uses latest patchset from rietveld. '
|
| 'Continuing using\npatchset %s.\n' % patchset)
|
| - if not options.use_rietveld:
|
| + if options.luci:
|
| + trigger_luci_job(cl, masters, options)
|
| + elif not options.use_rietveld:
|
| try:
|
| trigger_try_jobs(auth_config, cl, options, masters, 'git_cl_try')
|
| except BuildbucketResponseException as ex:
|
|
|