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

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

Issue 2064453002: add recipe continuous builders for each repo with recipes (Closed) Base URL: https://chromium.googlesource.com/chromium/tools/build.git@master
Patch Set: Created 4 years, 6 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
OLDNEW
1 # Copyright 2016 The Chromium Authors. All rights reserved. 1 # Copyright 2016 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 collections 5 import collections
6 import hashlib 6 import hashlib
7 import json 7 import json
8 import re 8 import re
9 9
10 from recipe_engine import recipe_api 10 from recipe_engine import recipe_api
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after
144 """ 144 """
145 This is intended as a utility module for recipe tryjobs. Currently it's just a 145 This is intended as a utility module for recipe tryjobs. Currently it's just a
146 refactored version of a recipe; eventually some of this, especially the 146 refactored version of a recipe; eventually some of this, especially the
147 dependency information, will probably get moved into the recipe engine. 147 dependency information, will probably get moved into the recipe engine.
148 """ 148 """
149 def _get_project_config(self, project): 149 def _get_project_config(self, project):
150 """Fetch the project config from luci-config. 150 """Fetch the project config from luci-config.
151 151
152 Args: 152 Args:
153 project: The name of the project in luci-config. 153 project: The name of the project in luci-config.
154 auth_token: Authentication token to use when talking to luci-config.
155 154
156 Returns: 155 Returns:
157 The recipes.cfg file for that project, as a parsed dictionary. See 156 The recipes.cfg file for that project, as a parsed dictionary. See
158 parse_protobuf for details on the format to expect. 157 parse_protobuf for details on the format to expect.
159 """ 158 """
160 result = self.m.luci_config.get_project_config(project, 'recipes.cfg') 159 result = self.m.luci_config.get_project_config(project, 'recipes.cfg')
161 160
162 parsed = parse_protobuf(result['content'].split('\n')) 161 parsed = parse_protobuf(result['content'].split('\n'))
163 return parsed 162 return parsed
164 163
(...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after
339 except recipe_api.StepFailure: 338 except recipe_api.StepFailure:
340 if should_fail_build_mapping.get(proj, True): 339 if should_fail_build_mapping.get(proj, True):
341 bad_projects.append(proj) 340 bad_projects.append(proj)
342 341
343 if bad_projects: 342 if bad_projects:
344 raise recipe_api.StepFailure( 343 raise recipe_api.StepFailure(
345 "One or more projects failed tests: %s" % ( 344 "One or more projects failed tests: %s" % (
346 ','.join(bad_projects))) 345 ','.join(bad_projects)))
347 346
348 347
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698