| OLD | NEW |
| 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 slave import recipe_api | 10 from recipe_engine import recipe_api |
| 11 | 11 |
| 12 | 12 |
| 13 class TriggerApi(recipe_api.RecipeApi): | 13 class TriggerApi(recipe_api.RecipeApi): |
| 14 """APIs for triggering new builds.""" | 14 """APIs for triggering new builds.""" |
| 15 | 15 |
| 16 def __init__(self, **kwargs): | 16 def __init__(self, **kwargs): |
| 17 super(TriggerApi, self).__init__(**kwargs) | 17 super(TriggerApi, self).__init__(**kwargs) |
| 18 | 18 |
| 19 def _port_from_properties_only(self, trigger_spec): | 19 def _port_from_properties_only(self, trigger_spec): |
| 20 """Convert from previous "properties-only" mode to trigger spec.""" | 20 """Convert from previous "properties-only" mode to trigger spec.""" |
| (...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 103 builder_names.add(builder_name) | 103 builder_names.add(builder_name) |
| 104 | 104 |
| 105 result = self.m.step( | 105 result = self.m.step( |
| 106 kwargs.get('name', 'trigger'), | 106 kwargs.get('name', 'trigger'), |
| 107 cmd=[], | 107 cmd=[], |
| 108 trigger_specs=trigger_specs, | 108 trigger_specs=trigger_specs, |
| 109 ) | 109 ) |
| 110 if 'name' not in kwargs: | 110 if 'name' not in kwargs: |
| 111 result.presentation.step_text = "<br />".join(sorted(builder_names)) | 111 result.presentation.step_text = "<br />".join(sorted(builder_names)) |
| 112 return result | 112 return result |
| OLD | NEW |