mirror of
https://github.com/f-droid/fdroidserver.git
synced 2025-11-05 15:00:30 +03:00
A scientific solution to issues with vagrant 1.3.5
This commit is contained in:
parent
db33ae75e5
commit
c0987b6803
1 changed files with 8 additions and 0 deletions
|
|
@ -102,6 +102,8 @@ def build_server(app, thisbuild, vcs, build_dir, output_dir, force):
|
||||||
if options.verbose:
|
if options.verbose:
|
||||||
print "...suspending"
|
print "...suspending"
|
||||||
vagrant(['suspend'], cwd='builder')
|
vagrant(['suspend'], cwd='builder')
|
||||||
|
print "...waiting a sec..."
|
||||||
|
time.sleep(10)
|
||||||
p = subprocess.Popen(['VBoxManage', 'snapshot', get_builder_vm_id(), 'restore', 'fdroidclean'],
|
p = subprocess.Popen(['VBoxManage', 'snapshot', get_builder_vm_id(), 'restore', 'fdroidclean'],
|
||||||
cwd='builder', stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
|
cwd='builder', stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
|
||||||
output = p.communicate()[0]
|
output = p.communicate()[0]
|
||||||
|
|
@ -112,6 +114,8 @@ def build_server(app, thisbuild, vcs, build_dir, output_dir, force):
|
||||||
retcode, output = vagrant(['up'], cwd='builder')
|
retcode, output = vagrant(['up'], cwd='builder')
|
||||||
if retcode != 0:
|
if retcode != 0:
|
||||||
raise BuildException("Failed to start build server")
|
raise BuildException("Failed to start build server")
|
||||||
|
print "...waiting a sec..."
|
||||||
|
time.sleep(10)
|
||||||
vm_ok = True
|
vm_ok = True
|
||||||
else:
|
else:
|
||||||
print "...failed to reset to snapshot"
|
print "...failed to reset to snapshot"
|
||||||
|
|
@ -178,10 +182,14 @@ def build_server(app, thisbuild, vcs, build_dir, output_dir, force):
|
||||||
if p.returncode != 0:
|
if p.returncode != 0:
|
||||||
print output
|
print output
|
||||||
raise BuildException("Failed to take snapshot")
|
raise BuildException("Failed to take snapshot")
|
||||||
|
print "...waiting a sec..."
|
||||||
|
time.sleep(10)
|
||||||
print "Restarting new build server"
|
print "Restarting new build server"
|
||||||
retcode, _ = vagrant(['up'], cwd='builder')
|
retcode, _ = vagrant(['up'], cwd='builder')
|
||||||
if retcode != 0:
|
if retcode != 0:
|
||||||
raise BuildException("Failed to start build server")
|
raise BuildException("Failed to start build server")
|
||||||
|
print "...waiting a sec..."
|
||||||
|
time.sleep(10)
|
||||||
# Make sure it worked...
|
# Make sure it worked...
|
||||||
p = subprocess.Popen(['VBoxManage', 'snapshot', get_builder_vm_id(), 'list', '--details'],
|
p = subprocess.Popen(['VBoxManage', 'snapshot', get_builder_vm_id(), 'list', '--details'],
|
||||||
cwd='builder', stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
|
cwd='builder', stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue