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

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: Lint 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
« no previous file with comments | « .gitignore ('k') | luci_hacks/README.md » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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:
« no previous file with comments | « .gitignore ('k') | luci_hacks/README.md » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698