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

Side by Side Diff: scripts/slave/recipe_modules/trigger/api.py

Issue 1949753003: Fail build if triggering fails (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/build
Patch Set: addressed comments Created 4 years, 7 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 | Annotate | Revision Log
OLDNEW
1 # Copyright 2014 The Chromium Authors. All rights reserved. 1 # Copyright 2014 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 """This recipe module allows triggering builds within the same master. 5 """This recipe module allows triggering builds within the same master.
6 6
7 See README.md. 7 See README.md.
8 """ 8 """
9 9
10 from recipe_engine import recipe_api 10 from recipe_engine import recipe_api
(...skipping 20 matching lines...) Expand all
31 31
32 def __call__(self, *trigger_specs, **kwargs): 32 def __call__(self, *trigger_specs, **kwargs):
33 """Triggers new builds by builder names. 33 """Triggers new builds by builder names.
34 34
35 Args: 35 Args:
36 trigger_specs: a list of trigger dicts, where each dict specifies a build 36 trigger_specs: a list of trigger dicts, where each dict specifies a build
37 to trigger. Supported keys: 37 to trigger. Supported keys:
38 builder_name (str): in BuildBot context, builder name 38 builder_name (str): in BuildBot context, builder name
39 bucket (str): buildbucket bucket where the triggered builds will be 39 bucket (str): buildbucket bucket where the triggered builds will be
40 placed. 40 placed.
41 critical (bool): if True (default) and triggering fails on the
42 buildbot master side, mark entire build as failed (exception).
41 properties (dict): build properties for a new build. 43 properties (dict): build properties for a new build.
42 buildbot_changes (list of dict): list of Buildbot changes to create. 44 buildbot_changes (list of dict): list of Buildbot changes to create.
43 See below. 45 See below.
44 tags (dict or list of str): if the trigger build is scheduled through 46 tags (dict or list of str): if the trigger build is scheduled through
45 buildbucket, |tags| will be appended to the buildbucket build. 47 buildbucket, |tags| will be appended to the buildbucket build.
46 name: name of the step. If not specified, it is generated 48 name: name of the step. If not specified, it is generated
47 automatically. Its format may change in future. 49 automatically. Its format may change in future.
48 50
49 Buildbot changes: 51 Buildbot changes:
50 buildbot_changes (a list of dicts) is a list of changes for the 52 buildbot_changes (a list of dicts) is a list of changes for the
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
123 assert key != 'parent_build_id', 'parent_build_id tag is reserved' 125 assert key != 'parent_build_id', 'parent_build_id tag is reserved'
124 126
125 result = self.m.step( 127 result = self.m.step(
126 kwargs.get('name', 'trigger'), 128 kwargs.get('name', 'trigger'),
127 cmd=[], 129 cmd=[],
128 trigger_specs=trigger_specs, 130 trigger_specs=trigger_specs,
129 ) 131 )
130 if 'name' not in kwargs: 132 if 'name' not in kwargs:
131 result.presentation.step_text = "<br />".join(sorted(builder_names)) 133 result.presentation.step_text = "<br />".join(sorted(builder_names))
132 return result 134 return result
OLDNEW
« scripts/master/chromium_step.py ('K') | « scripts/master/chromium_step.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698