kitchen-dokken 2.1.8 → 2.1.9
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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +3 -0
- data/lib/kitchen/driver/dokken.rb +2 -7
- data/lib/kitchen/driver/dokken_version.rb +1 -1
- data/lib/kitchen/helpers.rb +16 -2
- data/lib/kitchen/provisioner/dokken.rb +8 -2
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 9ff9ae0aef7da46692d99db224bea980cb5abd73
|
|
4
|
+
data.tar.gz: 6105f417d480202d545176d77e40308acf94f82f
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 8841985e9e70281e36997d08db94bd2577988559c533b8c169f7992614c378b834a2e337d1523efb4d7bd1add6bcbbfce4e659caf10cec251be2a9157391ff62
|
|
7
|
+
data.tar.gz: 51f876da1dbc8d3b2e1b8dc91046c34aaac392fc71c5ccb7dddc5e84a7806c1f10a90c7d3de1aa65cdde8aa8c204fce5be6715429f67f6bbfffe2acd2948c3f3
|
data/CHANGELOG.md
CHANGED
|
@@ -95,11 +95,6 @@ module Kitchen
|
|
|
95
95
|
|
|
96
96
|
private
|
|
97
97
|
|
|
98
|
-
def remote_docker_host?
|
|
99
|
-
return true if config[:docker_host_url] =~ /^tcp:/
|
|
100
|
-
false
|
|
101
|
-
end
|
|
102
|
-
|
|
103
98
|
def api_retries
|
|
104
99
|
config[:api_retries]
|
|
105
100
|
end
|
|
@@ -201,8 +196,8 @@ module Kitchen
|
|
|
201
196
|
|
|
202
197
|
def dokken_binds
|
|
203
198
|
ret = []
|
|
204
|
-
ret << "#{dokken_kitchen_sandbox}:/opt/kitchen" unless dokken_kitchen_sandbox.nil?
|
|
205
|
-
ret << "#{dokken_verifier_sandbox}:/opt/verifier" unless dokken_verifier_sandbox.nil?
|
|
199
|
+
ret << "#{dokken_kitchen_sandbox}:/opt/kitchen" unless dokken_kitchen_sandbox.nil? || remote_docker_host?
|
|
200
|
+
ret << "#{dokken_verifier_sandbox}:/opt/verifier" unless dokken_verifier_sandbox.nil? || remote_docker_host?
|
|
206
201
|
ret << Array(config[:binds]) unless config[:binds].nil?
|
|
207
202
|
ret.flatten
|
|
208
203
|
end
|
data/lib/kitchen/helpers.rb
CHANGED
|
@@ -145,6 +145,22 @@ EOF
|
|
|
145
145
|
return true if config[:docker_host_url] =~ /^tcp:/
|
|
146
146
|
false
|
|
147
147
|
end
|
|
148
|
+
|
|
149
|
+
def sandbox_path
|
|
150
|
+
"#{Dir.home}/.dokken/verifier_sandbox/#{instance_name}"
|
|
151
|
+
end
|
|
152
|
+
|
|
153
|
+
def sandbox_dirs
|
|
154
|
+
Dir.glob(File.join(sandbox_path, '*'))
|
|
155
|
+
end
|
|
156
|
+
|
|
157
|
+
def create_sandbox
|
|
158
|
+
info("Creating kitchen sandbox in #{sandbox_path}")
|
|
159
|
+
unless ::Dir.exist?(sandbox_path)
|
|
160
|
+
FileUtils.mkdir_p(sandbox_path)
|
|
161
|
+
File.chmod(0755, sandbox_path)
|
|
162
|
+
end
|
|
163
|
+
end
|
|
148
164
|
end
|
|
149
165
|
end
|
|
150
166
|
|
|
@@ -192,8 +208,6 @@ module Kitchen
|
|
|
192
208
|
|
|
193
209
|
def call(state)
|
|
194
210
|
create_sandbox
|
|
195
|
-
sandbox_dirs = Dir.glob(File.join(sandbox_path, '*'))
|
|
196
|
-
|
|
197
211
|
instance.transport.connection(state) do |conn|
|
|
198
212
|
conn.execute(install_command)
|
|
199
213
|
|
|
@@ -35,11 +35,17 @@ module Kitchen
|
|
|
35
35
|
default_config :chef_options, ' -z'
|
|
36
36
|
default_config :chef_log_level, 'warn'
|
|
37
37
|
default_config :chef_output_format, 'doc'
|
|
38
|
+
default_config :docker_host_url, default_docker_host
|
|
38
39
|
|
|
39
40
|
# (see Base#call)
|
|
40
41
|
def call(state)
|
|
41
42
|
create_sandbox
|
|
42
43
|
instance.transport.connection(state) do |conn|
|
|
44
|
+
if remote_docker_host?
|
|
45
|
+
info("Transferring files to #{instance.to_str}")
|
|
46
|
+
conn.upload(sandbox_dirs, config[:root_path])
|
|
47
|
+
end
|
|
48
|
+
|
|
43
49
|
conn.execute(prepare_command)
|
|
44
50
|
conn.execute_with_retry(
|
|
45
51
|
run_command,
|
|
@@ -50,8 +56,8 @@ module Kitchen
|
|
|
50
56
|
end
|
|
51
57
|
rescue Kitchen::Transport::TransportFailed => ex
|
|
52
58
|
raise ActionFailed, ex.message
|
|
53
|
-
|
|
54
|
-
|
|
59
|
+
ensure
|
|
60
|
+
cleanup_sandbox if remote_docker_host?
|
|
55
61
|
end
|
|
56
62
|
|
|
57
63
|
def validate_config
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: kitchen-dokken
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 2.1.
|
|
4
|
+
version: 2.1.9
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Sean OMeara
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2017-06-
|
|
11
|
+
date: 2017-06-13 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: test-kitchen
|