mirror of
https://github.com/f-droid/fdroidserver.git
synced 2025-09-13 22:42:29 +03:00
makebuildserver: move copy_caches_from_host to command line flag
This commit is contained in:
parent
21ea1c1c89
commit
abdd02f33a
3 changed files with 3 additions and 13 deletions
|
@ -32,16 +32,6 @@
|
||||||
#
|
#
|
||||||
# cachedir = 'buildserver/cache'
|
# 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
|
# To specify which Debian mirror the build server VM should use, by
|
||||||
# default it uses http.debian.net, which auto-detects which is the
|
# default it uses http.debian.net, which auto-detects which is the
|
||||||
# best mirror to use.
|
# best mirror to use.
|
||||||
|
|
|
@ -69,7 +69,6 @@ fi
|
||||||
cat <<EOF > $WORKSPACE/makebuildserver.config.py
|
cat <<EOF > $WORKSPACE/makebuildserver.config.py
|
||||||
debian_mirror = 'http://deb.debian.org/debian/'
|
debian_mirror = 'http://deb.debian.org/debian/'
|
||||||
boot_timeout = 1200
|
boot_timeout = 1200
|
||||||
copy_caches_from_host = True
|
|
||||||
memory = $memory
|
memory = $memory
|
||||||
cpus = $cpus
|
cpus = $cpus
|
||||||
EOF
|
EOF
|
||||||
|
|
|
@ -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,
|
parser.add_option('--skip-cache-update', action="store_true", default=False,
|
||||||
help="""Skip downloading and checking cache."""
|
help="""Skip downloading and checking cache."""
|
||||||
"""This assumes that the cache is already downloaded completely.""")
|
"""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,
|
parser.add_option('--keep-box-file', action="store_true", default=False,
|
||||||
help="""Box file will not be deleted after adding it to box storage"""
|
help="""Box file will not be deleted after adding it to box storage"""
|
||||||
""" (KVM-only).""")
|
""" (KVM-only).""")
|
||||||
|
@ -77,7 +79,6 @@ BASEBOX_CHECKSUMS = {
|
||||||
config = {
|
config = {
|
||||||
'basebox': BASEBOX_DEFAULT,
|
'basebox': BASEBOX_DEFAULT,
|
||||||
'debian_mirror': 'https://deb.debian.org/debian/',
|
'debian_mirror': 'https://deb.debian.org/debian/',
|
||||||
'copy_caches_from_host': False,
|
|
||||||
'boot_timeout': 600,
|
'boot_timeout': 600,
|
||||||
'cachedir': os.path.join(os.getenv('HOME'), '.cache', 'fdroidserver'),
|
'cachedir': os.path.join(os.getenv('HOME'), '.cache', 'fdroidserver'),
|
||||||
'cpus': 1,
|
'cpus': 1,
|
||||||
|
@ -376,7 +377,7 @@ def main():
|
||||||
logging.error("'vagrant up' failed.")
|
logging.error("'vagrant up' failed.")
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
|
|
||||||
if config['copy_caches_from_host']:
|
if options.copy_caches_from_host:
|
||||||
ssh_config = v.ssh_config()
|
ssh_config = v.ssh_config()
|
||||||
user = re.search(r'User ([^ \n]+)', ssh_config).group(1)
|
user = re.search(r'User ([^ \n]+)', ssh_config).group(1)
|
||||||
hostname = re.search(r'HostName ([^ \n]+)', ssh_config).group(1)
|
hostname = re.search(r'HostName ([^ \n]+)', ssh_config).group(1)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue