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

Unified Diff: scripts/common/annotator.py

Issue 966993002: api.trigger: refactoring, made extensible (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/build
Patch Set: fixes Created 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | scripts/slave/recipe_modules/step/config.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: scripts/common/annotator.py
diff --git a/scripts/common/annotator.py b/scripts/common/annotator.py
index af665631fe1c4f9ee07b032a1f767acc7b35053d..b110c5d22c8c41256ff62fa4fd94ff4d8bb0b2d6 100755
--- a/scripts/common/annotator.py
+++ b/scripts/common/annotator.py
@@ -447,21 +447,18 @@ def normalizeChange(change):
def triggerBuilds(step, trigger_specs):
assert trigger_specs is not None
for trig in trigger_specs:
- props = trig.get('properties')
- if not props:
- raise ValueError('Trigger spec: properties are missing')
- builder_name = props.pop('buildername', None)
+ builder_name = trig.get('builder_name')
if not builder_name:
- raise ValueError('Trigger spec: buildername property is missing')
+ raise ValueError('Trigger spec: builder_name is not set')
- changes = props.get('buildbot.changes', [])
- assert isinstance(changes, list), 'buildbot.changes must be a list'
+ changes = trig.get('buildbot_changes', [])
+ assert isinstance(changes, list), 'buildbot_changes must be a list'
changes = map(normalizeChange, changes)
step.step_trigger(json.dumps({
'builderNames': [builder_name],
'changes': changes,
- 'properties': props,
+ 'properties': trig.get('properties'),
}, sort_keys=True))
« no previous file with comments | « no previous file | scripts/slave/recipe_modules/step/config.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698