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

Unified Diff: third_party/WebKit/Tools/Scripts/webkitpy/common/net/buildbot.py

Issue 2658983003: Add build link to rebaseline-o-matic CL descriptions. (Closed)
Patch Set: Created 3 years, 11 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 | « no previous file | third_party/WebKit/Tools/Scripts/webkitpy/tool/commands/auto_rebaseline.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Tools/Scripts/webkitpy/common/net/buildbot.py
diff --git a/third_party/WebKit/Tools/Scripts/webkitpy/common/net/buildbot.py b/third_party/WebKit/Tools/Scripts/webkitpy/common/net/buildbot.py
index 88e2988bfcde99a325c642351347ab41003013e2..bab2b1cb1ab3ccaa8096bdda13751c06f49c3701 100644
--- a/third_party/WebKit/Tools/Scripts/webkitpy/common/net/buildbot.py
+++ b/third_party/WebKit/Tools/Scripts/webkitpy/common/net/buildbot.py
@@ -120,3 +120,13 @@ class BuildBot(object):
# urlopen returns a file-like object which sometimes works fine with str()
# but sometimes is a addinfourl object. In either case calling read() is correct.
return result.read()
+
+
+def current_build_link(host):
+ """Returns a link to the current job if running on buildbot, or None."""
+ master_name = host.environ.get('BUILDBOT_MASTERNAME')
+ builder_name = host.environ.get('BUILDBOT_BUILDERNAME')
+ build_number = host.environ.get('BUILDBOT_BUILDNUMBER')
+ if not (master_name and builder_name and build_number):
+ return None
+ return 'https://build.chromium.org/p/%s/builders/%s/builds/%s' % (master_name, builder_name, build_number)
« no previous file with comments | « no previous file | third_party/WebKit/Tools/Scripts/webkitpy/tool/commands/auto_rebaseline.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698