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

Side by Side 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, 10 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 unified diff | 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 »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright (c) 2009, Google Inc. All rights reserved. 1 # Copyright (c) 2009, Google Inc. All rights reserved.
2 # 2 #
3 # Redistribution and use in source and binary forms, with or without 3 # Redistribution and use in source and binary forms, with or without
4 # modification, are permitted provided that the following conditions are 4 # modification, are permitted provided that the following conditions are
5 # met: 5 # met:
6 # 6 #
7 # * Redistributions of source code must retain the above copyright 7 # * Redistributions of source code must retain the above copyright
8 # notice, this list of conditions and the following disclaimer. 8 # notice, this list of conditions and the following disclaimer.
9 # * Redistributions in binary form must reproduce the above 9 # * Redistributions in binary form must reproduce the above
10 # copyright notice, this list of conditions and the following disclaimer 10 # copyright notice, this list of conditions and the following disclaimer
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
113 113
114 def _fetch_file(self, url_base, file_name): 114 def _fetch_file(self, url_base, file_name):
115 # It seems this can return None if the url redirects and then returns 40 4. 115 # It seems this can return None if the url redirects and then returns 40 4.
116 # FIXME: This could use Web instead of using urllib2 directly. 116 # FIXME: This could use Web instead of using urllib2 directly.
117 result = urllib2.urlopen("%s/%s" % (url_base, file_name)) 117 result = urllib2.urlopen("%s/%s" % (url_base, file_name))
118 if not result: 118 if not result:
119 return None 119 return None
120 # urlopen returns a file-like object which sometimes works fine with str () 120 # urlopen returns a file-like object which sometimes works fine with str ()
121 # but sometimes is a addinfourl object. In either case calling read() i s correct. 121 # but sometimes is a addinfourl object. In either case calling read() i s correct.
122 return result.read() 122 return result.read()
123
124
125 def current_build_link(host):
126 """Returns a link to the current job if running on buildbot, or None."""
127 master_name = host.environ.get('BUILDBOT_MASTERNAME')
128 builder_name = host.environ.get('BUILDBOT_BUILDERNAME')
129 build_number = host.environ.get('BUILDBOT_BUILDNUMBER')
130 if not (master_name and builder_name and build_number):
131 return None
132 return 'https://build.chromium.org/p/%s/builders/%s/builds/%s' % (master_nam e, builder_name, build_number)
OLDNEW
« 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