diff options
author | Peter Wilmott <p@p8952.info> | 2015-01-15 19:44:15 +0000 |
---|---|---|
committer | Peter Wilmott <p@p8952.info> | 2015-01-15 19:44:15 +0000 |
commit | b5513060b59905a2a8a12362045d54250b713d11 (patch) | |
tree | 76ed75567950704c7c6b04881b51a7767a5b176a /web/lib | |
parent | Wrap calls to AWS in vagrant_rbapi to allow running on other platforms (diff) | |
download | ruby-tinderbox-b5513060b59905a2a8a12362045d54250b713d11.tar.gz ruby-tinderbox-b5513060b59905a2a8a12362045d54250b713d11.tar.bz2 ruby-tinderbox-b5513060b59905a2a8a12362045d54250b713d11.zip |
Allow setting aws as a Vagrant provisioner
Diffstat (limited to 'web/lib')
-rw-r--r-- | web/lib/ci.rb | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/web/lib/ci.rb b/web/lib/ci.rb index 98a1ec2..383493e 100644 --- a/web/lib/ci.rb +++ b/web/lib/ci.rb @@ -1,4 +1,4 @@ -def run_ci(num_of_packages) +def run_ci(num_of_packages, provisioner) packages = [] Package.order { [category, lower(name), version] }.each do |package| packages << package[:identifier] @@ -23,14 +23,10 @@ def run_ci(num_of_packages) begin vagrant_path = File.dirname(File.dirname(File.expand_path(File.dirname(__FILE__)))) vagrant = Vagrant_Rbapi.new(vagrant_path) - vagrant.up + vagrant.up(provisioner) sleep 5 while vagrant.status != 'running' - config = vagrant.ssh_config vagrant.ssh('sudo /vagrant/tinder.sh ' + packages.join(' ')) - - Net::SCP.start(config[0], config[1], port: config[2], key_data: [File.read(config[3])]) do |scp| - scp.download!('/home/ec2-user/ci-logs', vagrant_path + '/web', recursive: true) - end + vagrant.scp(:download, true, '/vagrant/ci-logs', 'web') ensure vagrant.destroy end |