kitchen-dokken 2.1.0 → 2.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/kitchen/driver/dokken_version.rb +1 -1
- data/lib/kitchen/helpers.rb +17 -6
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f9d2ddf8e5f7047998105636514a824a79549690
|
4
|
+
data.tar.gz: f9da77645ac9bd7a67cdd69d13ff710658dc1deb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d8e350f0a9045c887fac93778816adba5dd7ab1ed845719618a7d415b338c190cf58476a2c1237f616f5108f8526ff4aeede9b650198a37070130954cc6a3cff
|
7
|
+
data.tar.gz: 819154386f7040db29be052d09d5acf59b600107a957e1733596d951cb0ab39bf4f7a8583cb8b8fb4779fd5d5abc4d9ea3610884034c2e73334be66c39c05e2c
|
data/lib/kitchen/helpers.rb
CHANGED
@@ -161,8 +161,10 @@ module Kitchen
|
|
161
161
|
class Base
|
162
162
|
def create_sandbox
|
163
163
|
info("Creating kitchen sandbox in #{sandbox_path}")
|
164
|
-
|
165
|
-
|
164
|
+
unless ::Dir.exist?(sandbox_path)
|
165
|
+
FileUtils.mkdir_p(sandbox_path)
|
166
|
+
File.chmod(0755, sandbox_path)
|
167
|
+
end
|
166
168
|
end
|
167
169
|
|
168
170
|
def sandbox_path
|
@@ -175,15 +177,24 @@ module Kitchen
|
|
175
177
|
end
|
176
178
|
|
177
179
|
def call(state)
|
178
|
-
|
179
|
-
|
180
|
+
create_sandbox
|
181
|
+
sandbox_dirs = Dir.glob(File.join(sandbox_path, "*"))
|
182
|
+
|
183
|
+
instance.transport.connection(state) do |conn|
|
184
|
+
conn.execute(install_command)
|
185
|
+
|
186
|
+
unless state[:data_container].nil?
|
187
|
+
conn.execute(init_command)
|
188
|
+
info("Transferring files to #{instance.to_str}")
|
189
|
+
conn.upload(sandbox_dirs, config[:root_path])
|
190
|
+
debug("Transfer complete")
|
191
|
+
end
|
192
|
+
|
180
193
|
conn.execute(prepare_command)
|
181
194
|
conn.execute(run_command)
|
182
195
|
end
|
183
196
|
rescue Kitchen::Transport::TransportFailed => ex
|
184
197
|
raise ActionFailed, ex.message
|
185
|
-
ensure
|
186
|
-
cleanup_sandbox
|
187
198
|
end
|
188
199
|
end
|
189
200
|
end
|