kitchen-dokken 2.16.0 → 2.17.0
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
- 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: 0b2d590af89b1fde3cb1a0d5a5d681abbd377462aaa0cde0b2b7809802db21e1
|
4
|
+
data.tar.gz: 92983e5510abd9b522fc7a046d62d56637f56c321504ad5d0691f21e8e2db4dd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fa71281c52fc0e3004fd5a243e9c595a76648a5038d0fa8f2bb842a05d4b9ea34c2c7666b48d297882243241687d837eeae04fc8a75f33a98dfa50971e252f41
|
7
|
+
data.tar.gz: 722f40d25fc652b26c353a81262d769ebfff3159317b38b7f7c1f8111fd8585d335970261646dd4092fad3aa6d860698f116ca5f71946f2ebaa1b97700bbffbc
|
@@ -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
|
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.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: 2021-
|
11
|
+
date: 2021-12-01 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.32
|
101
101
|
signing_key:
|
102
102
|
specification_version: 4
|
103
103
|
summary: A Test Kitchen Driver for Docker & Chef Infra optimized for rapid testing
|