aboutsummaryrefslogtreecommitdiffstats
path: root/python/servo/bootstrap.py
diff options
context:
space:
mode:
authorAneesh Agrawal <aneeshusa@gmail.com>2017-04-12 02:00:14 -0400
committerAneesh Agrawal <aneeshusa@gmail.com>2017-04-12 02:00:14 -0400
commit0a9a43aa31beb7d8955f9ae9a1c605b341a59510 (patch)
tree3f4d2fd28a28aa62cf0cdddd6c83c0ca8f238d2a /python/servo/bootstrap.py
parent7262270990f17834137dda35bdab665abd7482e0 (diff)
downloadservo-0a9a43aa31beb7d8955f9ae9a1c605b341a59510.tar.gz
servo-0a9a43aa31beb7d8955f9ae9a1c605b341a59510.zip
Add env var for local saltfs root during bootstrap
Diffstat (limited to 'python/servo/bootstrap.py')
-rw-r--r--python/servo/bootstrap.py22
1 files changed, 16 insertions, 6 deletions
diff --git a/python/servo/bootstrap.py b/python/servo/bootstrap.py
index 35be5c67b92..1357abac14a 100644
--- a/python/servo/bootstrap.py
+++ b/python/servo/bootstrap.py
@@ -78,18 +78,28 @@ def salt(context, force=False):
# Hence, dynamically generate the config with an appropriate `root_dir`
# and serialize it as JSON (which is valid YAML).
config = {
- 'fileserver_backend': ['git'],
- 'gitfs_env_whitelist': 'base',
- 'gitfs_provider': 'gitpython',
- 'gitfs_remotes': [
- 'https://github.com/servo/saltfs.git',
- ],
'hash_type': 'sha384',
'master': 'localhost',
'root_dir': salt_root,
'state_output': 'changes',
'state_tabular': True,
}
+ if 'SERVO_SALTFS_ROOT' in os.environ:
+ config.update({
+ 'fileserver_backend': ['roots'],
+ 'file_roots': {
+ 'base': [os.path.abspath(os.environ['SERVO_SALTFS_ROOT'])],
+ },
+ })
+ else:
+ config.update({
+ 'fileserver_backend': ['git'],
+ 'gitfs_env_whitelist': 'base',
+ 'gitfs_provider': 'gitpython',
+ 'gitfs_remotes': [
+ 'https://github.com/servo/saltfs.git',
+ ],
+ })
if not os.path.exists(config_dir):
os.makedirs(config_dir, mode=0o700)