This repository has been archived by the owner on Sep 28, 2023. It is now read-only.
forked from net-ssh/net-ssh
-
Notifications
You must be signed in to change notification settings - Fork 6
/
Rudyfile
96 lines (83 loc) · 2.01 KB
/
Rudyfile
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
# Rudyfile
#
# This configuration is used to test installing
# and running net-ssh on a clean machine.
#
# Usage:
#
# $ rudy -vv startup
# $ rudy -vv testsuite
# $ rudy -vv shutdown
#
# Requires: Rudy 0.9 (http://code.google.com/p/rudy/)
#
defaults do
color true
environment :test
role :netssh
end
machines do
region :'us-east-1' do
ami 'ami-e348af8a' # Alestic Debian 5.0, 32-bit (US)
end
env :test do
role :netssh do
user :root
end
end
end
commands do
allow :apt_get, "apt-get", :y, :q
allow :gem_install, "/usr/bin/gem", "install", :n, '/usr/bin', :y, :V, "--no-rdoc", "--no-ri"
allow :gem_sources, "/usr/bin/gem", "sources"
allow :gem_uninstall, "/usr/bin/gem", "uninstall", :V
allow :update_rubygems
allow :rm
end
routines do
testsuite do
before :sysupdate, :installdeps, :install_gem
remote :root do
directory_upload 'test', '/tmp/'
cd '/tmp'
ruby :I, 'lib/', :I, 'test/', :r, 'rubygems', 'test/test_all.rb'
end
after :install_rubyforge, :install_github
end
install_gem do
before :package_gem
remote :root do
disable_safe_mode
file_upload "pkg/net-ssh-*.gem", "/tmp/"
gem_install "/tmp/net-ssh-*.gem"
end
end
package_gem do
local do
rm :r, :f, 'pkg'
rake 'package'
end
end
remove do
remote :root do
gem_uninstall 'net-ssh'
end
end
installdeps do
remote :root do
gem_install "rye", "test-unit", "mocha"
rye 'authorize-local'
end
end
sysupdate do
remote :root do
apt_get "update"
apt_get "install", "build-essential", "git-core"
apt_get "install", "ruby1.8-dev", "rdoc", "libzlib-ruby", "rubygems"
mkdir :p, "/var/lib/gems/1.8/bin" # Doesn't get created, but causes Rubygems to fail
gem_install "builder", "session"
gem_install 'rubygems-update', "-v=1.3.4" # circular issue with 1.3.5 and hoe
update_rubygems
end
end
end