kitchen-dokken 2.1.6 → 2.1.7

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 9542662c0401ceb1ecf7c7ee9b2f64bb93235abb
4
- data.tar.gz: f8f22845915285d458affc73c68d4cd063aa1e22
3
+ metadata.gz: efbf96ca5b0ca0c3d40ebba12366344d6c57c14b
4
+ data.tar.gz: 3d55d6ad8f53872a1705e1f33dc8db3b6033665e
5
5
  SHA512:
6
- metadata.gz: c21a4687a8256b3819617b879c4d9ce3c2eab2bc551d7f291c1c84e92a0e3082509929646e138c9508fc83399d6aff535657fecd54b8ce773af7afa40c679ade
7
- data.tar.gz: e65d5623e21ce1df2409c43fbdc00fdfe6ec3ffa19e00eafd65a8dc9d320c0cafc8d21496dabfadcaef96d0de3c8a8385201c5c701463e17b0affb38b628c300
6
+ metadata.gz: 310c30253e415a0fe611b0735fcb02dc1512105674356a35e4e1934c3fc551743a127299c21d4e95e85d68cb546e7e5b77091819733c052f226ee1ca1dc76dc9
7
+ data.tar.gz: 659ef467deec7be33f9b2ccf3873b63603c94bec873b332aec43a80d9f91a78b42f69466c7d3e02e660134085bd722774c269d35a2836ecfe2bf9ce527320135
data/CHANGELOG.md CHANGED
@@ -1,7 +1,11 @@
1
1
  # Dokken Changelog
2
2
 
3
+ # 2.1.7
4
+ - bumping version. must have accidentally pushed a 2.1.6
5
+
3
6
  # 2.1.6
4
- - #102 - Use platform name for image unless specified
7
+ - PR #107 - pass write_timeout to runner exec
8
+ - PR #110 - (fix issue #109) - Add retry feature
5
9
 
6
10
  # 2.1.5
7
11
  - Fixing (again) latest/current logic (thanks @tas50)
@@ -19,6 +19,6 @@
19
19
  module Kitchen
20
20
  module Driver
21
21
  # Version string for Dokken Kitchen driver
22
- DOKKEN_VERSION = '2.1.6'.freeze
22
+ DOKKEN_VERSION = '2.1.7'.freeze
23
23
  end
24
24
  end
@@ -120,7 +120,7 @@ EOF
120
120
  # refs:
121
121
  # https://github.com/docker/machine/issues/1814
122
122
  # https://github.com/docker/toolbox/issues/607
123
- return Dir.home.sub 'C:/Users', '/c/Users' if (Dir.home =~ /^C:/ and remote_docker_host?)
123
+ return Dir.home.sub 'C:/Users', '/c/Users' if Dir.home =~ /^C:/ && remote_docker_host?
124
124
  Dir.home
125
125
  end
126
126
 
@@ -188,18 +188,18 @@ module Kitchen
188
188
 
189
189
  def call(state)
190
190
  create_sandbox
191
- sandbox_dirs = Dir.glob(File.join(sandbox_path, "*"))
192
-
193
- instance.transport.connection(state) do |conn|
194
- conn.execute(install_command)
195
-
191
+ sandbox_dirs = Dir.glob(File.join(sandbox_path, '*'))
192
+
193
+ instance.transport.connection(state) do |conn|
194
+ conn.execute(install_command)
195
+
196
196
  unless state[:data_container].nil?
197
197
  conn.execute(init_command)
198
198
  info("Transferring files to #{instance.to_str}")
199
199
  conn.upload(sandbox_dirs, config[:root_path])
200
- debug("Transfer complete")
200
+ debug('Transfer complete')
201
201
  end
202
-
202
+
203
203
  conn.execute(prepare_command)
204
204
  conn.execute(run_command)
205
205
  end
@@ -40,7 +40,13 @@ module Kitchen
40
40
  def call(state)
41
41
  create_sandbox
42
42
  instance.transport.connection(state) do |conn|
43
- conn.execute(run_command)
43
+ conn.execute(prepare_command)
44
+ conn.execute_with_retry(
45
+ run_command,
46
+ config[:retry_on_exit_code],
47
+ config[:max_retries],
48
+ config[:wait_for_retry]
49
+ )
44
50
  end
45
51
  rescue Kitchen::Transport::TransportFailed => ex
46
52
  raise ActionFailed, ex.message
@@ -68,11 +68,11 @@ module Kitchen
68
68
 
69
69
  with_retries { @runner = ::Docker::Container.get(instance_name, {}, docker_connection) }
70
70
  with_retries do
71
- o = @runner.exec(Shellwords.shellwords(command), 'e' => { 'TERM' => 'xterm' }) { |_stream, chunk| print chunk.to_s }
71
+ o = @runner.exec(Shellwords.shellwords(command), wait: options[:timeout], 'e' => { 'TERM' => 'xterm' }) { |_stream, chunk| print chunk.to_s }
72
72
  @exit_code = o[2]
73
73
  end
74
74
 
75
- raise Transport::DockerExecFailed, "Docker Exec (#{@exit_code}) for command: [#{command}]" if @exit_code != 0
75
+ raise Transport::DockerExecFailed.new("Docker Exec (#{@exit_code}) for command: [#{command}]", @exit_code) if @exit_code != 0
76
76
  end
77
77
 
78
78
  def upload(locals, remote)
@@ -191,6 +191,7 @@ module Kitchen
191
191
  opts[:docker_host_options] = ::Docker.options
192
192
  opts[:data_container] = data[:data_container]
193
193
  opts[:instance_name] = data[:instance_name]
194
+ opts[:timeout] = data[:write_timeout]
194
195
  opts
195
196
  end
196
197
 
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.6
4
+ version: 2.1.7
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-05-11 00:00:00.000000000 Z
11
+ date: 2017-06-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: test-kitchen