mirror of
https://gitlab.com/fdroid/fdroidserver.git
synced 2024-10-05 18:50:09 +02:00
makebuildserver prune gloabal vagrant status when purging broken VMs
This commit is contained in:
parent
8cfd3ca770
commit
2aa5523011
@ -304,6 +304,7 @@ def destroy_current_image(v, serverdir):
|
|||||||
v.destroy()
|
v.destroy()
|
||||||
elif options.verbose:
|
elif options.verbose:
|
||||||
print('Cannot run destroy vagrant setup since Vagrantfile.yaml is not setup!')
|
print('Cannot run destroy vagrant setup since Vagrantfile.yaml is not setup!')
|
||||||
|
subprocess.check_call(['vagrant', 'global-status', '--prune'])
|
||||||
|
|
||||||
try:
|
try:
|
||||||
shutil.rmtree(os.path.join(serverdir, '.vagrant'))
|
shutil.rmtree(os.path.join(serverdir, '.vagrant'))
|
||||||
@ -346,7 +347,7 @@ def kvm_package(boxfile):
|
|||||||
img_info = json.loads(img_info_raw.decode('utf-8'))
|
img_info = json.loads(img_info_raw.decode('utf-8'))
|
||||||
metadata = {"provider": "libvirt",
|
metadata = {"provider": "libvirt",
|
||||||
"format": img_info['format'],
|
"format": img_info['format'],
|
||||||
"virtual_size": math.ceil(img_info['virtual-size'] / 1024.**3),
|
"virtual_size": math.ceil(img_info['virtual-size'] / 1024. ** 3),
|
||||||
}
|
}
|
||||||
|
|
||||||
vagrantfile = """Vagrant.configure("2") do |config|
|
vagrantfile = """Vagrant.configure("2") do |config|
|
||||||
|
Loading…
Reference in New Issue
Block a user