kitchen-dokken 2.2.1 → 2.2.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: f99765024f84e7ed1247430ee079552dfe854aaf
4
- data.tar.gz: a46f76f7279a9c1e338ad618872bc2f84a2e120c
3
+ metadata.gz: 5758ff1410fbf25008ce323eab6d27340835c482
4
+ data.tar.gz: 3efaa5e7c5ef7cbe4ddd452b16d53a78beb9bba7
5
5
  SHA512:
6
- metadata.gz: c7286b5e1d1f24cbc0e496885d425f3a72008784f212580626ce9b36c701dd943109eab6c6677535955aaa6482c50218caab785cfdfe242f12a9f429c2d75d91
7
- data.tar.gz: c6a1aba29911833f2d3e39d2c3da8ea98137bed40b9667c734fbb7ef32513e5ed8bde93ab9ea0f4523c80cf40a730b3938c5cec55100def8757521428af2f1ae
6
+ metadata.gz: aedf4dd36c3e2fdc23afdc970b4f1f55829dc3cd1133327e033871dd43bc0a1e24b61c3b795e1c0d9d20642cf29dab834f2b5791efbdc40d9d4389d0c462bf5f
7
+ data.tar.gz: e412ab58916d486eaa0c4e0d31532a3e28e4888e5ebc054152af1051f83b68b1332010daa06a0af91b243a296b93a4597a444b73a095cd444728e20390279939
data/CHANGELOG.md CHANGED
@@ -1,5 +1,8 @@
1
1
  # Dokken Changelog
2
2
 
3
+ # 2.2.2
4
+ - bugfix: Creating dokken network before chef container
5
+
3
6
  # 2.2.1
4
7
  - Putting chef-client container in dokken network
5
8
  - casting aliases to Array
@@ -60,13 +60,13 @@ module Kitchen
60
60
  # image to config
61
61
  pull_platform_image
62
62
 
63
+ # network
64
+ make_dokken_network
65
+
63
66
  # chef
64
67
  pull_chef_image
65
68
  create_chef_container state
66
69
 
67
- # network
68
- make_dokken_network
69
-
70
70
  # data
71
71
  dokken_create_sandbox
72
72
 
@@ -297,8 +297,8 @@ module Kitchen
297
297
  def make_dokken_network
298
298
  debug 'driver - creating dokken network'
299
299
  Docker::Network.create('dokken', {})
300
- rescue
301
- debug 'driver - dokken network already exists'
300
+ rescue ::Docker::Error => e
301
+ debug "driver - :#{e}:"
302
302
  end
303
303
 
304
304
  def make_data_image
@@ -311,24 +311,25 @@ module Kitchen
311
311
  rescue ::Docker::Error::NotFoundError
312
312
  begin
313
313
  debug "driver - creating volume container #{chef_container_name} from #{chef_image}"
314
- chef_container = create_container(
314
+ config = {
315
315
  'name' => chef_container_name,
316
316
  'Cmd' => 'true',
317
317
  'Image' => "#{repo(chef_image)}:#{tag(chef_image)}",
318
318
  'HostConfig' => {
319
- 'NetworkMode' => config[:network_mode],
319
+ 'NetworkMode' => self[:network_mode],
320
320
  },
321
321
  'NetworkingConfig' => {
322
322
  'EndpointsConfig' => {
323
323
  self[:network_mode] => {
324
- 'Aliases' => Array(config[:hostname]),
324
+ 'Aliases' => Array(self[:hostname]),
325
325
  },
326
326
  },
327
- }
328
- )
327
+ },
328
+ }
329
+ chef_container = create_container(config)
329
330
  state[:chef_container] = chef_container.json
330
- rescue
331
- debug "driver - #{chef_container_name} already exists"
331
+ rescue ::Docker::Error => e
332
+ raise "driver - #{chef_container_name} failed to create #{e}"
332
333
  end
333
334
  end
334
335
 
@@ -19,6 +19,6 @@
19
19
  module Kitchen
20
20
  module Driver
21
21
  # Version string for Dokken Kitchen driver
22
- DOKKEN_VERSION = '2.2.1'.freeze
22
+ DOKKEN_VERSION = '2.2.2'.freeze
23
23
  end
24
24
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: kitchen-dokken
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.2.1
4
+ version: 2.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sean OMeara