kitchen-dokken 2.24.0 → 2.25.0
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/Gemfile +1 -2
- data/lib/kitchen/driver/dokken.rb +46 -0
- data/lib/kitchen/driver/dokken_version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: c712b6533f76b28643283d228dad566b0cecc7ad856b0b2e8c0a37a7577f28ee
|
|
4
|
+
data.tar.gz: 7c84488e75a2d2c05029eea1d2d935d235d266742a0539456a28590bdd512a4b
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: f0ee27961e74995e48eff9725effcc2c47405bd02136a2adf1d58ab69cce9bf2109cecd12ecef71889a59db6a59845427ee2bc4b5c8d289cde5cf78a81bb9461
|
|
7
|
+
data.tar.gz: 767e8b79c3e2431605faa15a801a7e14d2507573b80483be4c46283bb29cd7818a80ca9c534acd8208d1ce1a0b0bcab5fe44c04df615de5d8bcda673b3ed3147
|
data/Gemfile
CHANGED
|
@@ -186,8 +186,54 @@ module Kitchen
|
|
|
186
186
|
}
|
|
187
187
|
end
|
|
188
188
|
|
|
189
|
+
# Checks the two things that stop a dokken run before it starts.
|
|
190
|
+
#
|
|
191
|
+
# @param state [Hash] mutable instance and driver state
|
|
192
|
+
# @return [Boolean] true when a problem was reported
|
|
193
|
+
def doctor(state) # rubocop:disable Lint/UnusedMethodArgument
|
|
194
|
+
problems = daemon_problems + creds_file_problems
|
|
195
|
+
|
|
196
|
+
problems.each { |problem| warn(problem) }
|
|
197
|
+
!problems.empty?
|
|
198
|
+
end
|
|
199
|
+
|
|
189
200
|
private
|
|
190
201
|
|
|
202
|
+
# Confirms the docker daemon is actually reachable, which is the single
|
|
203
|
+
# most common reason a dokken run fails, and reports the version when it
|
|
204
|
+
# is so the answer is useful rather than merely green.
|
|
205
|
+
#
|
|
206
|
+
# @return [Array<String>] a connectivity problem, or an empty array
|
|
207
|
+
def daemon_problems
|
|
208
|
+
version = ::Docker.version(docker_connection)
|
|
209
|
+
info("docker daemon at #{config[:docker_host_url]} is reachable " \
|
|
210
|
+
"(version #{version["Version"]}, API #{version["ApiVersion"]})")
|
|
211
|
+
[]
|
|
212
|
+
rescue ::StandardError => e
|
|
213
|
+
["Could not reach the docker daemon at #{config[:docker_host_url]}: " \
|
|
214
|
+
"#{e.message}"]
|
|
215
|
+
end
|
|
216
|
+
|
|
217
|
+
# A configured creds_file that cannot be read or parsed fails inside
|
|
218
|
+
# +authenticate!+ on the first line of +create+, before anything is
|
|
219
|
+
# built, so it is worth catching here.
|
|
220
|
+
#
|
|
221
|
+
# @return [Array<String>] a credentials problem, or an empty array
|
|
222
|
+
def creds_file_problems
|
|
223
|
+
return [] if config[:creds_file].nil?
|
|
224
|
+
|
|
225
|
+
unless File.exist?(config[:creds_file])
|
|
226
|
+
return ["creds_file #{config[:creds_file]} does not exist."]
|
|
227
|
+
end
|
|
228
|
+
|
|
229
|
+
JSON.parse(IO.read(config[:creds_file]))
|
|
230
|
+
[]
|
|
231
|
+
rescue JSON::ParserError => e
|
|
232
|
+
["creds_file #{config[:creds_file]} is not valid JSON: #{e.message}"]
|
|
233
|
+
rescue ::StandardError => e
|
|
234
|
+
["creds_file #{config[:creds_file]} could not be read: #{e.message}"]
|
|
235
|
+
end
|
|
236
|
+
|
|
191
237
|
# Translate a container's `State` into kitchen's status shape.
|
|
192
238
|
#
|
|
193
239
|
# @param container [::Docker::Container] the runner container
|
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.
|
|
4
|
+
version: 2.25.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Sean OMeara
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2026-
|
|
11
|
+
date: 2026-10-01 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: docker-api
|