kitchen-dokken 2.15.0 → 2.17.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/kitchen/driver/dokken.rb +20 -1
- data/lib/kitchen/driver/dokken_version.rb +1 -1
- data/lib/kitchen/transport/dokken.rb +4 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 439fb37e48ca255580cdd6030a23c4c1b4e7934f068673dab400580f74220a36
|
4
|
+
data.tar.gz: 30bf493770664d64183dda32f620e28c8ce52a101c9a0dff102722bfb9e22f1c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 167d8f6dcee24404a402a7e7949f80acbb8cf6e1ee12cdfe523913dadf5ef17f384b88a49670c8012e471ea2599b8095e13485423cfe67c55d9261cb0fe7191c
|
7
|
+
data.tar.gz: ea8a6a0462740bab02bdcd0ef0ab2bf2810a3f097523c5f6cb824e8b25cf31a023aefbb3b3fda796b68fa4ea560b3b92281a0f178f882047c86e39b1aad6e8c0
|
@@ -66,9 +66,13 @@ module Kitchen
|
|
66
66
|
default_config :userns_host, false
|
67
67
|
default_config :volumes, nil
|
68
68
|
default_config :write_timeout, 3600
|
69
|
+
default_config :creds_file, nil
|
69
70
|
|
70
71
|
# (see Base#create)
|
71
72
|
def create(state)
|
73
|
+
# Authenticate the private registry
|
74
|
+
authenticate!
|
75
|
+
|
72
76
|
# image to config
|
73
77
|
pull_platform_image
|
74
78
|
|
@@ -410,6 +414,21 @@ module Kitchen
|
|
410
414
|
end
|
411
415
|
end
|
412
416
|
|
417
|
+
def authenticate!
|
418
|
+
# No need to authenticate if the credentials are empty
|
419
|
+
return if docker_creds.empty?
|
420
|
+
|
421
|
+
::Docker.authenticate! docker_creds
|
422
|
+
end
|
423
|
+
|
424
|
+
def docker_creds
|
425
|
+
@docker_creds ||= if config[:creds_file]
|
426
|
+
JSON.parse(IO.read(config[:creds_file]))
|
427
|
+
else
|
428
|
+
{}
|
429
|
+
end
|
430
|
+
end
|
431
|
+
|
413
432
|
def pull_platform_image
|
414
433
|
debug "driver - pulling #{short_image_path(platform_image)}"
|
415
434
|
config[:pull_platform_image] ? pull_image(platform_image) : pull_if_missing(platform_image)
|
@@ -602,7 +621,7 @@ module Kitchen
|
|
602
621
|
original_image = Docker::Image.get(path, {}, docker_connection)
|
603
622
|
end
|
604
623
|
|
605
|
-
new_image = Docker::Image.create({ "fromImage" => path },
|
624
|
+
new_image = Docker::Image.create({ "fromImage" => path }, docker_creds, docker_connection)
|
606
625
|
|
607
626
|
!(original_image && original_image.id.start_with?(new_image.id))
|
608
627
|
end
|
@@ -69,7 +69,9 @@ module Kitchen
|
|
69
69
|
|
70
70
|
with_retries { @runner = ::Docker::Container.get(instance_name, {}, docker_connection) }
|
71
71
|
with_retries do
|
72
|
-
o = @runner.exec(Shellwords.shellwords(command), wait: options[:timeout], "e" => { "TERM" => "xterm" })
|
72
|
+
o = @runner.exec(Shellwords.shellwords(command), wait: options[:timeout], "e" => { "TERM" => "xterm" }) do |_stream, chunk|
|
73
|
+
logger << chunk
|
74
|
+
end
|
73
75
|
@exit_code = o[2]
|
74
76
|
end
|
75
77
|
|
@@ -224,6 +226,7 @@ module Kitchen
|
|
224
226
|
# @api private
|
225
227
|
def connection_options(data)
|
226
228
|
opts = {}
|
229
|
+
opts[:logger] = logger
|
227
230
|
opts[:host_ip_override] = config[:host_ip_override]
|
228
231
|
opts[:docker_host_url] = config[:docker_host_url]
|
229
232
|
opts[:docker_host_options] = ::Docker.options
|
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.17.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sean OMeara
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2022-06-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: docker-api
|
@@ -97,7 +97,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
97
97
|
- !ruby/object:Gem::Version
|
98
98
|
version: '0'
|
99
99
|
requirements: []
|
100
|
-
rubygems_version: 3.2.
|
100
|
+
rubygems_version: 3.2.3
|
101
101
|
signing_key:
|
102
102
|
specification_version: 4
|
103
103
|
summary: A Test Kitchen Driver for Docker & Chef Infra optimized for rapid testing
|