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

Side by Side Diff: recipe_modules/path/config.py

Issue 1667713002: add git_cache to base_paths (Closed) Base URL: https://github.com/luci/recipes-py.git@master
Patch Set: Created 4 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright 2013 The Chromium Authors. All rights reserved. 1 # Copyright 2013 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.config import config_item_context, ConfigGroup, Dict, Static 5 from recipe_engine.config import config_item_context, ConfigGroup, Dict, Static
6 from recipe_engine.config_types import Path 6 from recipe_engine.config_types import Path
7 7
8 def BaseConfig(CURRENT_WORKING_DIR, TEMP_DIR, **_kwargs): 8 def BaseConfig(CURRENT_WORKING_DIR, TEMP_DIR, **_kwargs):
9 assert CURRENT_WORKING_DIR[0].endswith(('\\', '/')) 9 assert CURRENT_WORKING_DIR[0].endswith(('\\', '/'))
10 assert TEMP_DIR[0].endswith(('\\', '/')) 10 assert TEMP_DIR[0].endswith(('\\', '/'))
(...skipping 18 matching lines...) Expand all
29 29
30 @config_ctx(is_root=True) 30 @config_ctx(is_root=True)
31 def BASE(c): 31 def BASE(c):
32 c.base_paths['cwd'] = c.CURRENT_WORKING_DIR 32 c.base_paths['cwd'] = c.CURRENT_WORKING_DIR
33 c.base_paths['tmp_base'] = c.TEMP_DIR 33 c.base_paths['tmp_base'] = c.TEMP_DIR
34 34
35 @config_ctx() 35 @config_ctx()
36 def buildbot(c): 36 def buildbot(c):
37 c.base_paths['root'] = c.CURRENT_WORKING_DIR[:-4] 37 c.base_paths['root'] = c.CURRENT_WORKING_DIR[:-4]
38 c.base_paths['slave_build'] = c.CURRENT_WORKING_DIR 38 c.base_paths['slave_build'] = c.CURRENT_WORKING_DIR
39 c.base_paths['git_cache'] = c.base_paths['root'] + ('slave', 'cache_dir')
39 for token in ('build_internal', 'build', 'depot_tools'): 40 for token in ('build_internal', 'build', 'depot_tools'):
40 c.base_paths[token] = c.base_paths['root'] + (token,) 41 c.base_paths[token] = c.base_paths['root'] + (token,)
41 c.dynamic_paths['checkout'] = None 42 c.dynamic_paths['checkout'] = None
42 43
43 @config_ctx() 44 @config_ctx()
44 def example(c): 45 def example(c):
45 c.base_paths['slave_build'] = c.CURRENT_WORKING_DIR 46 c.base_paths['slave_build'] = c.CURRENT_WORKING_DIR
46 c.dynamic_paths['borts'] = None 47 c.dynamic_paths['borts'] = None
47 48
48 @config_ctx(includes=['buildbot']) 49 @config_ctx(includes=['buildbot'])
49 def swarming(c): 50 def swarming(c):
50 c.base_paths['slave_build'] = ( 51 c.base_paths['slave_build'] = (
51 c.CURRENT_WORKING_DIR[:1] + 52 c.CURRENT_WORKING_DIR[:1] +
52 ('b', 'fake_build', 'slave', 'fake_slave', 'build')) 53 ('b', 'fake_build', 'slave', 'fake_slave', 'build'))
53 54
54 @config_ctx() 55 @config_ctx()
55 def kitchen(c): 56 def kitchen(c):
56 # TODO(phajdan.jr): Fully implement the kitchen config. 57 # TODO(phajdan.jr): Fully implement the kitchen config.
57 c.base_paths['root'] = c.CURRENT_WORKING_DIR 58 c.base_paths['root'] = c.CURRENT_WORKING_DIR
58 c.base_paths['slave_build'] = c.CURRENT_WORKING_DIR 59 c.base_paths['slave_build'] = c.CURRENT_WORKING_DIR
60 c.base_paths['git_cache'] = c.base_paths['root'] + ('cache_dir',)
59 c.dynamic_paths['checkout'] = None 61 c.dynamic_paths['checkout'] = None
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698