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

Side by Side Diff: recipe_modules/bot_update/api.py

Issue 1917263002: Revert of depot_tools: add infra_paths recipe module for infra-specific paths (Closed) Base URL: https://chromium.googlesource.com/chromium/tools/depot_tools.git@master
Patch Set: Created 4 years, 8 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 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 5
6 """Recipe module to ensure a checkout is consistant on a bot.""" 6 """Recipe module to ensure a checkout is consistant on a bot."""
7 7
8 from recipe_engine import recipe_api 8 from recipe_engine import recipe_api
9 9
10 10
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
112 112
113 # The gerrit_ref and gerrit_repo must be together or not at all. If one is 113 # The gerrit_ref and gerrit_repo must be together or not at all. If one is
114 # missing, clear both of them. 114 # missing, clear both of them.
115 if not gerrit_ref or not gerrit_repo: 115 if not gerrit_ref or not gerrit_repo:
116 gerrit_repo = gerrit_ref = None 116 gerrit_repo = gerrit_ref = None
117 assert (gerrit_ref != None) == (gerrit_repo != None) 117 assert (gerrit_ref != None) == (gerrit_repo != None)
118 118
119 # Point to the oauth2 auth files if specified. 119 # Point to the oauth2 auth files if specified.
120 # These paths are where the bots put their credential files. 120 # These paths are where the bots put their credential files.
121 if patch_oauth2: 121 if patch_oauth2:
122 email_file = self.m.infra_paths['build'].join( 122 email_file = self.m.path['build'].join(
123 'site_config', '.rietveld_client_email') 123 'site_config', '.rietveld_client_email')
124 key_file = self.m.infra_paths['build'].join( 124 key_file = self.m.path['build'].join(
125 'site_config', '.rietveld_secret_key') 125 'site_config', '.rietveld_secret_key')
126 else: 126 else:
127 email_file = key_file = None 127 email_file = key_file = None
128 128
129 # Allow patch_project's revision if necessary. 129 # Allow patch_project's revision if necessary.
130 # This is important for projects which are checked out as DEPS of the 130 # This is important for projects which are checked out as DEPS of the
131 # gclient solution. 131 # gclient solution.
132 self.m.gclient.set_patch_project_revision( 132 self.m.gclient.set_patch_project_revision(
133 self.m.properties.get('patch_project'), cfg) 133 self.m.properties.get('patch_project'), cfg)
134 134
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after
269 else: 269 else:
270 # This is actual patch failure. 270 # This is actual patch failure.
271 self.m.tryserver.set_patch_failure_tryjob_result() 271 self.m.tryserver.set_patch_failure_tryjob_result()
272 self.m.python.failing_step( 272 self.m.python.failing_step(
273 'Patch failure', 'Check the bot_update step for details') 273 'Patch failure', 'Check the bot_update step for details')
274 274
275 # bot_update actually just sets root to be the folder name of the 275 # bot_update actually just sets root to be the folder name of the
276 # first solution. 276 # first solution.
277 if step_result.json.output['did_run']: 277 if step_result.json.output['did_run']:
278 co_root = step_result.json.output['root'] 278 co_root = step_result.json.output['root']
279 cwd = kwargs.get('cwd', self.m.infra_paths['slave_build']) 279 cwd = kwargs.get('cwd', self.m.path['slave_build'])
280 if 'checkout' not in self.m.path: 280 if 'checkout' not in self.m.path:
281 self.m.path['checkout'] = cwd.join(*co_root.split(self.m.path.sep)) 281 self.m.path['checkout'] = cwd.join(*co_root.split(self.m.path.sep))
282 282
283 return step_result 283 return step_result
OLDNEW
« no previous file with comments | « recipe_modules/bot_update/__init__.py ('k') | recipe_modules/bot_update/example.expected/basic.json » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698