Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(22)

Unified Diff: git_cl.py

Issue 1344183002: git cl try --luci, a set of hacks to demonstrate and iterate LUCI (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/depot_tools
Patch Set: Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: git_cl.py
diff --git a/git_cl.py b/git_cl.py
index caa9b604b2d54800f8b4d0a0ebc5851d91b930bf..61a8457ff62f90a1c8866c96659b0e7386c3b8a0 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
@@ -228,6 +229,20 @@ def _prefix_master(master):
return '%s%s' % (prefix, master)
+def trigger_luci_job(changelist, masters, options):
+ """Send a job to run on LUCI."""
+ try_py = os.path.join(
+ os.path.dirname(
+ os.path.abspath(__file__)), 'luci_hacks', 'luci_recipe_run.py')
+ issue_props = changelist.GetIssueProperties()
+ issue = changelist.GetIssue()
+ patchset = changelist.GetMostRecentPatchset()
+ for _, builders_and_tests in sorted(masters.iteritems()):
estaab 2015/09/15 23:05:14 itervalues()
Ryan Tseng 2015/09/17 23:39:23 Done.
+ for builder, _ in sorted(builders_and_tests.iteritems()):
estaab 2015/09/15 23:05:14 iterkeys()
Ryan Tseng 2015/09/17 23:39:23 Done.
+ luci_trigger.trigger(
+ builder, 'HEAD', issue, patchset, issue_props['project'])
+
+
def trigger_try_jobs(auth_config, changelist, options, masters, category,
override_properties=None):
rietveld_url = settings.GetDefaultServerUrl()
@@ -3059,6 +3074,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 "
@@ -3177,7 +3193,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:
« no previous file with comments | « .gitignore ('k') | luci_hacks/README.md » ('j') | luci_hacks/luci_recipe_run.py » ('J')

Powered by Google App Engine
This is Rietveld 408576698