chiark / gitweb /
makebuildserver: make chef find the custom cache locations
authorHans-Christoph Steiner <hans@eds.org>
Tue, 26 Jan 2016 21:06:10 +0000 (22:06 +0100)
committerHans-Christoph Steiner <hans@eds.org>
Wed, 3 Feb 2016 13:54:14 +0000 (14:54 +0100)
makebuildserver

index aeb5ebbc60fad1fc59bd4c99f5a0e60c58dc8613..77c6063cce22fe792ce22e64ce477b4af79f62ad 100755 (executable)
@@ -367,6 +367,13 @@ if 'aptproxy' in config and config['aptproxy']:
   config.vm.provision :shell, :inline => 'sudo echo "Acquire::http {{ Proxy \\"{0}\\"; }};" > /etc/apt/apt.conf.d/02proxy && sudo apt-get update'
 """.format(config['aptproxy'])
 
+# buildserver/ is shared to the VM's /vagrant by default so the old default
+# does not need a custom mount
+if cachedir != 'buildserver/cache':
+    vagrantfile += """
+  config.vm.synced_folder '{0}', '/vagrant/cache'
+""".format(cachedir)
+
 vagrantfile += """
   config.vm.provision :chef_solo do |chef|
     chef.cookbooks_path = "cookbooks"