kitchen-dokken 2.7.0 → 2.9.1

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
  SHA256:
3
- metadata.gz: 430a35ea6cfd6b64127fcaa56964ccd46fc856fb8d2711e40e1c1e35a6dbdccc
4
- data.tar.gz: a63f9d33388c8eec1d029458cafbb7379379522cad387bd78f1166b60a9e0c54
3
+ metadata.gz: 1cf6fdff38752942d8eb2ec416874255a581ce4d2e7607aa0aa10eccbe5c7c1e
4
+ data.tar.gz: 5389972a3d453448c9206995302a76b6880ddfd39919cfd4f35661db83feb8f4
5
5
  SHA512:
6
- metadata.gz: 18431ecd5008ce194b6f6dd64d590fb7c97594e9d0c287e54bb6263d3a88a553023da5d112f4e5a1c206b4a58dea699d8b01f7025a8d8fd9f8b051e409693f73
7
- data.tar.gz: '09c7a44c4c6a5e06be8296e545a02a49d0d09a6c0c0540891b7e36e875ce6484de01dd7f33c91bcbaf66310f64414de1b61f57177d733e080549dc31bc3a385e'
6
+ metadata.gz: 1c49b83d7bd26b2bd0e9feac76c6e36d70938ccb9e6e5a032c8fdb86ce2e28fae6f7fcee1687963035bbee34fd92ac92e9014ed08af7f7b12e812cf13af8eecb
7
+ data.tar.gz: 1983818b9795b4af4294e585f58a0fd88ff048a8d2ca3ca28a39c279a063ba298526d9275258ec8ab9b8af38c8953b2dd468e7faa674fcf8de47add995a04b8a
@@ -436,6 +436,9 @@ module Kitchen
436
436
  rescue
437
437
  with_retries do
438
438
  begin
439
+ args['Env'] = [] if args['Env'].nil?
440
+ args['Env'] << 'TEST_KITCHEN=1'
441
+ args['Env'] << "CI=#{ENV['CI']}" if ENV.include? 'CI'
439
442
  info "Creating container #{args['name']}"
440
443
  debug "driver - create_container args #{args}"
441
444
  with_retries do
@@ -18,6 +18,6 @@
18
18
  module Kitchen
19
19
  module Driver
20
20
  # Version string for Dokken Kitchen driver
21
- DOKKEN_VERSION = '2.7.0'.freeze
21
+ DOKKEN_VERSION = '2.9.1'.freeze
22
22
  end
23
23
  end
@@ -30,7 +30,7 @@ module Kitchen
30
30
  plugin_version Kitchen::VERSION
31
31
 
32
32
  default_config :root_path, '/opt/kitchen'
33
- default_config :chef_binary, '/opt/chef/embedded/bin/chef-client'
33
+ default_config :chef_binary, '/opt/chef/bin/chef-client'
34
34
  default_config :chef_options, ' -z'
35
35
  default_config :chef_log_level, 'warn'
36
36
  default_config :chef_output_format, 'doc'
@@ -50,10 +50,12 @@ module Kitchen
50
50
  driver = provisioner.instance.driver
51
51
  driver[:chef_version]
52
52
  end
53
+ default_config :clean_dokken_sandbox, true
53
54
 
54
55
  # (see Base#call)
55
56
  def call(state)
56
57
  create_sandbox
58
+ write_run_command(run_command)
57
59
  instance.transport.connection(state) do |conn|
58
60
  if remote_docker_host?
59
61
  info("Transferring files to #{instance.to_str}")
@@ -62,7 +64,7 @@ module Kitchen
62
64
 
63
65
  conn.execute(prepare_command)
64
66
  conn.execute_with_retry(
65
- run_command,
67
+ "sh #{config[:root_path]}/run_command",
66
68
  config[:retry_on_exit_code],
67
69
  config[:max_retries],
68
70
  config[:wait_for_retry]
@@ -71,6 +73,7 @@ module Kitchen
71
73
  rescue Kitchen::Transport::TransportFailed => ex
72
74
  raise ActionFailed, ex.message
73
75
  ensure
76
+ return unless config[:clean_dokken_sandbox]
74
77
  cleanup_dokken_sandbox
75
78
  end
76
79
 
@@ -103,6 +106,12 @@ module Kitchen
103
106
  cmd << " -F #{config[:chef_output_format]}"
104
107
  cmd << ' -c /opt/kitchen/client.rb'
105
108
  cmd << ' -j /opt/kitchen/dna.json'
109
+
110
+ chef_cmd(cmd)
111
+ end
112
+
113
+ def write_run_command(command)
114
+ File.write("#{dokken_kitchen_sandbox}/run_command", command)
106
115
  end
107
116
 
108
117
  def runner_container_name
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.7.0
4
+ version: 2.9.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sean OMeara
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-05-29 00:00:00.000000000 Z
11
+ date: 2020-07-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: docker-api
@@ -75,7 +75,7 @@ homepage: https://github.com/someara/kitchen-dokken
75
75
  licenses:
76
76
  - Apache-2.0
77
77
  metadata: {}
78
- post_install_message:
78
+ post_install_message:
79
79
  rdoc_options: []
80
80
  require_paths:
81
81
  - lib
@@ -90,8 +90,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
90
90
  - !ruby/object:Gem::Version
91
91
  version: '0'
92
92
  requirements: []
93
- rubygems_version: 3.0.3
94
- signing_key:
93
+ rubygems_version: 3.1.2
94
+ signing_key:
95
95
  specification_version: 4
96
96
  summary: A Test Kitchen Driver that talks to the Docker Remote API and uses Volumes
97
97
  to produce sparse container images