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

Side by Side Diff: scripts/slave/recipe_modules/luci_config/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 from recipe_engine import recipe_api 5 from recipe_engine import recipe_api
6 6
7 import base64 7 import base64
8 import json 8 import json
9 9
10 class LuciConfigApi(recipe_api.RecipeApi): 10 class LuciConfigApi(recipe_api.RecipeApi):
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
64 url = self.c.base_url + '/_ah/api/config/v1/config_sets/' 64 url = self.c.base_url + '/_ah/api/config/v1/config_sets/'
65 url += self.m.url.quote('projects/%s/refs/heads/master' % project, safe='') 65 url += self.m.url.quote('projects/%s/refs/heads/master' % project, safe='')
66 url += '/config/%s' % config 66 url += '/config/%s' % config
67 67
68 fetch_result = self._fetch( 68 fetch_result = self._fetch(
69 url, step_name='Get project %r config %r' % (project, config), 69 url, step_name='Get project %r config %r' % (project, config),
70 headers=self._get_headers()) 70 headers=self._get_headers())
71 result = json.loads(fetch_result) 71 result = json.loads(fetch_result)
72 result['content'] = base64.b64decode(result['content']) 72 result['content'] = base64.b64decode(result['content'])
73 return result 73 return result
74
75 def get_project_metadata(self, project):
76 mapping = self.get_projects()
77 return mapping.get(project)
78
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698