diff --git a/examples/makebuildserver.config.py b/examples/makebuildserver.config.py index 7bba2c75..ff668a63 100644 --- a/examples/makebuildserver.config.py +++ b/examples/makebuildserver.config.py @@ -32,16 +32,6 @@ # # cachedir = 'buildserver/cache' -# The buildserver can use some local caches to speed up builds, -# especially when the internet connection is slow and/or expensive. -# If enabled, the buildserver setup will look for standard caches in -# your HOME dir and copy them to the buildserver VM. Be aware: this -# will reduce the isolation of the buildserver from your host machine, -# so the buildserver will provide an environment only as trustworthy -# as the host machine's environment. -# -# copy_caches_from_host = True - # To specify which Debian mirror the build server VM should use, by # default it uses http.debian.net, which auto-detects which is the # best mirror to use. diff --git a/jenkins-setup-build-environment b/jenkins-setup-build-environment index bc81530e..80bdade0 100755 --- a/jenkins-setup-build-environment +++ b/jenkins-setup-build-environment @@ -69,7 +69,6 @@ fi cat < $WORKSPACE/makebuildserver.config.py debian_mirror = 'http://deb.debian.org/debian/' boot_timeout = 1200 -copy_caches_from_host = True memory = $memory cpus = $cpus EOF diff --git a/makebuildserver b/makebuildserver index 47928cd8..b90e8ba9 100755 --- a/makebuildserver +++ b/makebuildserver @@ -27,6 +27,8 @@ parser.add_option("-c", "--clean", action="store_true", default=False, parser.add_option('--skip-cache-update', action="store_true", default=False, help="""Skip downloading and checking cache.""" """This assumes that the cache is already downloaded completely.""") +parser.add_option('--copy-caches-from-host', action="store_true", default=False, + help="""Copy gradle and pip caches into the buildserver VM""") parser.add_option('--keep-box-file', action="store_true", default=False, help="""Box file will not be deleted after adding it to box storage""" """ (KVM-only).""") @@ -77,7 +79,6 @@ BASEBOX_CHECKSUMS = { config = { 'basebox': BASEBOX_DEFAULT, 'debian_mirror': 'https://deb.debian.org/debian/', - 'copy_caches_from_host': False, 'boot_timeout': 600, 'cachedir': os.path.join(os.getenv('HOME'), '.cache', 'fdroidserver'), 'cpus': 1, @@ -376,7 +377,7 @@ def main(): logging.error("'vagrant up' failed.") sys.exit(1) - if config['copy_caches_from_host']: + if options.copy_caches_from_host: ssh_config = v.ssh_config() user = re.search(r'User ([^ \n]+)', ssh_config).group(1) hostname = re.search(r'HostName ([^ \n]+)', ssh_config).group(1)