small-ops 0.0.28 → 0.0.29
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/bin/fige +10 -0
- metadata +1 -1
data/bin/fige
CHANGED
|
@@ -11,6 +11,9 @@ OptionParser.new do |opts|
|
|
|
11
11
|
opts.on("-e", "--etcd host:port", "Set etcd host and port") do |e|
|
|
12
12
|
@options[:etcd] = e
|
|
13
13
|
end
|
|
14
|
+
opts.on("-d", "--data FOO=BAR,FUZ=BAZ",Array, "Insert data into each env") do |d|
|
|
15
|
+
@options[:data] = d
|
|
16
|
+
end
|
|
14
17
|
opts.on("-c","--command cmd","A command to execute after each run") do |c|
|
|
15
18
|
@options[:cmd]=c
|
|
16
19
|
end
|
|
@@ -95,6 +98,12 @@ apps.each {|k|
|
|
|
95
98
|
}
|
|
96
99
|
end
|
|
97
100
|
|
|
101
|
+
if @options[:data] then
|
|
102
|
+
@options[:data].each {|d|
|
|
103
|
+
cmd << " -e \"#{d}\" "
|
|
104
|
+
}
|
|
105
|
+
end
|
|
106
|
+
|
|
98
107
|
cmd << " -t #{yml[k]['image']} "
|
|
99
108
|
|
|
100
109
|
if yml[k].has_key? "command" then
|
|
@@ -105,6 +114,7 @@ apps.each {|k|
|
|
|
105
114
|
`docker pull #{yml[k]['image']} > /dev/null 2>&1`
|
|
106
115
|
end
|
|
107
116
|
|
|
117
|
+
puts cmd
|
|
108
118
|
cid = `#{cmd}`
|
|
109
119
|
@options[:containers].push(cid)
|
|
110
120
|
puts "#{yml[k]['name']} = #{cid}"
|