kitchen-inspec 0.20.0 → 0.22.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +10 -8
- data/CHANGELOG.md +26 -2
- data/lib/kitchen/verifier/inspec.rb +19 -9
- data/lib/kitchen/verifier/inspec_version.rb +1 -1
- 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: ad4914a1c6ff1f6606cdfc231cc8bfa58b640359
|
4
|
+
data.tar.gz: c8df553a805f8115da1113b7fe4abd568006d166
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4585ccf793c05ce905b399641cebace6a53adf1022b87f421a0575dba4094c1f9ec0b51cee7e67d3ab0c7792f132b80c1f2a43d79d216abeddedc9a17635fea4
|
7
|
+
data.tar.gz: 1afccb9494a0faf1c25c76423fd69110d7d21073205f84f77d0d574f2899f6a778460911e27a3d502ecc9711ea148e75ad9fd2b43baa8c4824db0e55e7310255
|
data/.travis.yml
CHANGED
@@ -9,29 +9,31 @@ services:
|
|
9
9
|
- docker
|
10
10
|
bundler_args: "--without integration guard tools"
|
11
11
|
before_install:
|
12
|
-
- gem
|
12
|
+
- gem update --system
|
13
13
|
- gem --version
|
14
|
+
- rvm @global do gem uninstall bundler -a -x
|
15
|
+
- rvm @global do gem install bundler
|
16
|
+
- bundle --version
|
14
17
|
matrix:
|
15
18
|
include:
|
16
|
-
- rvm: 2.
|
17
|
-
- rvm: 2.
|
18
|
-
- rvm: 2.3.1
|
19
|
+
- rvm: 2.3.6
|
20
|
+
- rvm: 2.4.3
|
19
21
|
bundler_args: "--without guard tools"
|
20
22
|
script: bundle exec rake $SUITE
|
21
23
|
env: SUITE="test:integration" OS='default profile contains_inspec'
|
22
|
-
- rvm: 2.3
|
24
|
+
- rvm: 2.4.3
|
23
25
|
bundler_args: "--without guard tools"
|
24
26
|
script: bundle exec rake $SUITE
|
25
27
|
env: SUITE="test:integration" OS='backwards'
|
26
|
-
- rvm: 2.3
|
28
|
+
- rvm: 2.4.3
|
27
29
|
bundler_args: "--without guard tools"
|
28
30
|
script: bundle exec rake $SUITE
|
29
31
|
env: SUITE="test:integration" OS='duplicates'
|
30
|
-
- rvm: 2.3
|
32
|
+
- rvm: 2.4.3
|
31
33
|
bundler_args: "--without guard tools"
|
32
34
|
script: bundle exec rake $SUITE
|
33
35
|
env: SUITE="test:integration" OS='supermarket'
|
34
|
-
- rvm: 2.3
|
36
|
+
- rvm: 2.4.3
|
35
37
|
bundler_args: "--without guard tools"
|
36
38
|
script: bundle exec rake $SUITE
|
37
39
|
env: SUITE="test:integration" OS='attributes-inline attributes-file'
|
data/CHANGELOG.md
CHANGED
@@ -1,7 +1,30 @@
|
|
1
1
|
# Change Log
|
2
2
|
|
3
|
-
## [0.
|
4
|
-
[Full Changelog](https://github.com/chef/kitchen-inspec/compare/v0.
|
3
|
+
## [0.22.0](https://github.com/chef/kitchen-inspec/tree/0.22.0) (2018-01-17)
|
4
|
+
[Full Changelog](https://github.com/chef/kitchen-inspec/compare/v0.20.0...0.22.0)
|
5
|
+
|
6
|
+
**Implemented enhancements:**
|
7
|
+
|
8
|
+
- Support use of SSH agent without requiring a key path to be set [\#142](https://github.com/chef/kitchen-inspec/issues/142)
|
9
|
+
|
10
|
+
**Fixed bugs:**
|
11
|
+
|
12
|
+
- Can't use Branch for verifier [\#157](https://github.com/chef/kitchen-inspec/issues/157)
|
13
|
+
|
14
|
+
**Closed issues:**
|
15
|
+
|
16
|
+
- Expose --backend-cache command-line option [\#154](https://github.com/chef/kitchen-inspec/issues/154)
|
17
|
+
- kitchen-inspec fails to configure HTTPS winrm for inspec [\#152](https://github.com/chef/kitchen-inspec/issues/152)
|
18
|
+
|
19
|
+
**Merged pull requests:**
|
20
|
+
|
21
|
+
- git fetcher: support branch/tag/ref [\#158](https://github.com/chef/kitchen-inspec/pull/158) ([adamleff](https://github.com/adamleff))
|
22
|
+
- Add the InSpec backend\_cache option [\#155](https://github.com/chef/kitchen-inspec/pull/155) ([jquick](https://github.com/jquick))
|
23
|
+
- correctly configure HTTPS WinRM [\#153](https://github.com/chef/kitchen-inspec/pull/153) ([joekhoobyar](https://github.com/joekhoobyar))
|
24
|
+
- Allow extending which transports are supported by kitchen-inspec [\#149](https://github.com/chef/kitchen-inspec/pull/149) ([coderanger](https://github.com/coderanger))
|
25
|
+
|
26
|
+
## [v0.20.0](https://github.com/chef/kitchen-inspec/tree/v0.20.0) (2017-11-13)
|
27
|
+
[Full Changelog](https://github.com/chef/kitchen-inspec/compare/v0.19.0...v0.20.0)
|
5
28
|
|
6
29
|
**Implemented enhancements:**
|
7
30
|
|
@@ -39,6 +62,7 @@
|
|
39
62
|
|
40
63
|
**Merged pull requests:**
|
41
64
|
|
65
|
+
- Release 0.20.0 [\#151](https://github.com/chef/kitchen-inspec/pull/151) ([adamleff](https://github.com/adamleff))
|
42
66
|
- Add a CODEOWNERS file [\#144](https://github.com/chef/kitchen-inspec/pull/144) ([adamleff](https://github.com/adamleff))
|
43
67
|
- Adding a maintainers file [\#143](https://github.com/chef/kitchen-inspec/pull/143) ([adamleff](https://github.com/adamleff))
|
44
68
|
- Eliminate duplicate profiles being added to runner [\#141](https://github.com/chef/kitchen-inspec/pull/141) ([adamleff](https://github.com/adamleff))
|
@@ -67,6 +67,7 @@ module Kitchen
|
|
67
67
|
|
68
68
|
# gather connection options
|
69
69
|
opts = runner_options(instance.transport, state, instance.platform.name, instance.suite.name)
|
70
|
+
logger.debug "Options #{opts.inspect}"
|
70
71
|
|
71
72
|
# add attributes
|
72
73
|
opts[:attrs] = config[:attrs]
|
@@ -156,7 +157,9 @@ module Kitchen
|
|
156
157
|
# foiled by extra stuff. However, if the only entry is a "name" key, then
|
157
158
|
# leave it alone so it can default to resolving to the Supermarket.
|
158
159
|
unless test_item.keys == [:name]
|
159
|
-
|
160
|
+
type_keys = [:path, :url, :git, :compliance]
|
161
|
+
git_keys = [:branch, :tag, :ref]
|
162
|
+
test_item.delete_if { |k, v| !(type_keys + git_keys).include?(k) }
|
160
163
|
end
|
161
164
|
elsif File.exist?(test_item)
|
162
165
|
# if the entry is a path to something on disk, rewrite as a Hash entry with a path key.
|
@@ -187,13 +190,8 @@ module Kitchen
|
|
187
190
|
# @api private
|
188
191
|
def runner_options(transport, state = {}, platform = nil, suite = nil) # rubocop:disable Metrics/AbcSize
|
189
192
|
transport_data = transport.diagnose.merge(state)
|
190
|
-
if transport.
|
191
|
-
|
192
|
-
elsif transport.is_a?(Kitchen::Transport::Winrm)
|
193
|
-
runner_options_for_winrm(transport_data)
|
194
|
-
# optional transport which is not in core test-kitchen
|
195
|
-
elsif defined?(Kitchen::Transport::Dokken) && transport.is_a?(Kitchen::Transport::Dokken)
|
196
|
-
runner_options_for_docker(transport_data)
|
193
|
+
if respond_to?("runner_options_for_#{transport.name.downcase}", true)
|
194
|
+
send("runner_options_for_#{transport.name.downcase}", transport_data)
|
197
195
|
else
|
198
196
|
raise Kitchen::UserError, "Verifier #{name} does not support the #{transport.name} Transport"
|
199
197
|
end.tap do |runner_options|
|
@@ -203,6 +201,16 @@ module Kitchen
|
|
203
201
|
runner_options["output"] = config[:output] % { platform: platform, suite: suite } unless config[:output].nil?
|
204
202
|
runner_options["profiles_path"] = config[:profiles_path] unless config[:profiles_path].nil?
|
205
203
|
runner_options[:controls] = config[:controls]
|
204
|
+
|
205
|
+
# check to make sure we have a valid version for caching
|
206
|
+
if config[:backend_cache]
|
207
|
+
backend_cache_msg = "backend_cache requires InSpec version >= 1.47.0"
|
208
|
+
logger.warn backend_cache_msg if Gem::Version.new(::Inspec::VERSION) < Gem::Version.new("1.47.0")
|
209
|
+
runner_options[:backend_cache] = config[:backend_cache]
|
210
|
+
else
|
211
|
+
# default to false until we default to true in inspec
|
212
|
+
runner_options[:backend_cache] = false
|
213
|
+
end
|
206
214
|
end
|
207
215
|
end
|
208
216
|
|
@@ -245,6 +253,8 @@ module Kitchen
|
|
245
253
|
opts = {
|
246
254
|
"backend" => "winrm",
|
247
255
|
"logger" => logger,
|
256
|
+
"ssl" => URI(kitchen[:endpoint]).scheme == "https",
|
257
|
+
"self_signed" => kitchen[:no_ssl_peer_verification],
|
248
258
|
"host" => config[:host] || URI(kitchen[:endpoint]).hostname,
|
249
259
|
"port" => config[:port] || URI(kitchen[:endpoint]).port,
|
250
260
|
"user" => kitchen[:user],
|
@@ -260,7 +270,7 @@ module Kitchen
|
|
260
270
|
#
|
261
271
|
# @return [Hash] a configuration hash of string-based keys
|
262
272
|
# @api private
|
263
|
-
def
|
273
|
+
def runner_options_for_dokken(config_data)
|
264
274
|
kitchen = instance.transport.send(:connection_options, config_data).dup
|
265
275
|
#
|
266
276
|
# Note: kitchen-dokken uses two containers the
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: kitchen-inspec
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.22.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Fletcher Nichol
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2018-01-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: inspec
|