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

Side by Side Diff: scripts/master/try_job_base_bb7.py

Issue 8847005: Add decorations to bot names for modifying parts of try sets. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/build/
Patch Set: '' Created 9 years 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 | Annotate | Revision Log
OLDNEW
1 # Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 # Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 import os 5 import os
6 6
7 from buildbot import buildset 7 from buildbot import buildset
8 from buildbot.changes.changes import Change 8 from buildbot.changes.changes import Change
9 from buildbot.scheduler import BadJobfile 9 from buildbot.scheduler import BadJobfile
10 from buildbot.scheduler import TryBase # pylint: disable=W0611 10 from buildbot.scheduler import TryBase # pylint: disable=W0611
11 from twisted.python import log 11 from twisted.python import log
12 from twisted.web import http 12 from twisted.web import http
13 13
14 from master.try_job_stamp import TryJobStamp 14 from master.try_job_stamp import TryJobStamp
15 import master.try_job_decoration as decor
15 16
16 17
17 class TryJobBaseMixIn: 18 class TryJobBaseMixIn:
18 def __init__(self): 19 def __init__(self):
19 pass 20 pass
20 21
21 def GetSourceStamp(self, options): 22 def GetSourceStamp(self, options):
22 """Grab try job settings.""" 23 """Grab try job settings."""
23 fake_changes = [ 24 fake_changes = [
24 Change(email, [''], '', revision=options['revision']) 25 Change(email, [''], '', revision=options['revision'])
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
99 log.msg('%s reports a bad job connection' % (self)) 100 log.msg('%s reports a bad job connection' % (self))
100 log.err() 101 log.err()
101 return http.BAD_REQUEST 102 return http.BAD_REQUEST
102 reason = "'%s' try job" % buildset_id 103 reason = "'%s' try job" % buildset_id
103 # Send one build request per builder, otherwise the cancelation logic 104 # Send one build request per builder, otherwise the cancelation logic
104 # doesn't work. 105 # doesn't work.
105 build_sets = [] 106 build_sets = []
106 assert isinstance(builder_names, list) 107 assert isinstance(builder_names, list)
107 for builder_name in builder_names: 108 for builder_name in builder_names:
108 build_set = buildset.BuildSet( 109 build_set = buildset.BuildSet(
109 [builder_name], 110 builder_name.split(':')[0:1],
M-A Ruel 2011/12/09 21:50:29 builder_name.split(':', 1)[0:1],
Peter Mayo 2011/12/10 01:08:27 Done.
110 jobstamp, 111 jobstamp,
111 reason=reason, 112 reason=reason,
112 bsid=buildset_id, 113 bsid=buildset_id,
113 properties=props) 114 properties=decor.parse_decoration(props,
115 ':'.join(builder_name.split(':')[1:])))
M-A Ruel 2011/12/09 21:50:29 ''.join(builder_name.split(':', 1)[1:])
Peter Mayo 2011/12/10 01:08:27 Done.
114 build_sets.append(build_set) 116 build_sets.append(build_set)
115 self.CancelJobsMatching(build_set, builder_name) 117 self.CancelJobsMatching(build_set, builder_name)
116 for build_set in build_sets: 118 for build_set in build_sets:
117 # Type inference error. 119 # Type inference error.
118 # pylint: disable=E1101 120 # pylint: disable=E1101
119 self.parent.submitBuildSet(build_set) 121 self.parent.submitBuildSet(build_set)
120 return http.OK 122 return http.OK
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698