forked from travis-ci/travis-worker
-
Notifications
You must be signed in to change notification settings - Fork 0
/
rebuild_vms
executable file
·38 lines (36 loc) · 894 Bytes
/
rebuild_vms
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#!/usr/bin/env ruby
puts "Disabled.\n\nPlease use the Thor command for rebuilding vagrant vms."
# $: << 'lib'
# require 'yaml'
# require 'travis/worker'
# require 'json'
#
# $stdout.sync = true
#
# def run(cmd)
# puts "$ #{cmd}"
# system cmd
# end
#
# def wait(seconds)
# puts "waiting for #{seconds} seconds"
# sleep(seconds)
# end
#
# config = Travis::Worker::Vagrant::Config.new(YAML.load_file('.vms.yml'))
#
# run 'bin/reset_vbox'
#
# run 'wget http://files.vagrantup.com/lucid32.box' unless File.exists?('lucid32.box')
# run 'vagrant box add lucid32 lucid32.box'
# exit unless run 'vagrant up base'
#
# vms = JSON.parse(File.read('.vagrant'))
# uuid = vms['active']['base'] || raise("could not find base uuid in #{vms.inspect}")
#
# run 'rm -rf base.box'
# run "vagrant package --base #{uuid}"
# run 'mv package.box base.box'
#
# run "vagrant box add base base.box"
# vagrant up