kitchen-vagrant 1.6.1 → 1.7.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/vagrant.rb +36 -0
- data/lib/kitchen/driver/vagrant_version.rb +1 -1
- metadata +6 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 963b45a50eb74ce9d7bb16de1f63231ab44096c1459652be556bd7bc4c2d38d1
|
4
|
+
data.tar.gz: 5c0297d2879a29dd777b3976d6cda4167463fb9233dca540d848c5d741282145
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a84c39b2411b0f6f80ad9c5c6dbeeab0eabae479c57c4cec4e7ce9f40f86466a9d7051176da592783dbf94b236bb049831ad61cabd7fc68201dd75baf5b75314
|
7
|
+
data.tar.gz: 4658e11b0222d2fcee0c69739f5e7eae88a7a64f54f43009c142572f7e7e35d922aa4630ab3e26b007d37fdc7bf80fb77b9f0aa77e8cbda0c8cb64f7ffb75d65
|
@@ -45,6 +45,10 @@ module Kitchen
|
|
45
45
|
|
46
46
|
default_config :box_check_update, nil
|
47
47
|
|
48
|
+
default_config :box_auto_update, nil
|
49
|
+
|
50
|
+
default_config :box_auto_prune, nil
|
51
|
+
|
48
52
|
default_config :box_download_insecure, nil
|
49
53
|
|
50
54
|
default_config :box_download_ca_cert, nil
|
@@ -109,6 +113,8 @@ module Kitchen
|
|
109
113
|
def create(state)
|
110
114
|
create_vagrantfile
|
111
115
|
run_pre_create_command
|
116
|
+
run_box_auto_update
|
117
|
+
run_box_auto_prune
|
112
118
|
run_vagrant_up
|
113
119
|
update_state(state)
|
114
120
|
instance.transport.connection(state).wait_until_ready
|
@@ -172,6 +178,8 @@ module Kitchen
|
|
172
178
|
def finalize_config!(instance)
|
173
179
|
super
|
174
180
|
finalize_vm_hostname!
|
181
|
+
finalize_box_auto_update!
|
182
|
+
finalize_box_auto_prune!
|
175
183
|
finalize_pre_create_command!
|
176
184
|
finalize_synced_folders!
|
177
185
|
finalize_ca_cert!
|
@@ -299,6 +307,20 @@ module Kitchen
|
|
299
307
|
end
|
300
308
|
end
|
301
309
|
|
310
|
+
# Create vagrant command to update box to the latest version
|
311
|
+
def finalize_box_auto_update!
|
312
|
+
return if config[:box_auto_update].nil?
|
313
|
+
|
314
|
+
config[:box_auto_update] = "vagrant box update #{'--insecure ' if config[:box_download_insecure]}--box #{config[:box]}"
|
315
|
+
end
|
316
|
+
|
317
|
+
# Create vagrant command to remove older versions of the box
|
318
|
+
def finalize_box_auto_prune!
|
319
|
+
return if config[:box_auto_prune].nil?
|
320
|
+
|
321
|
+
config[:box_auto_prune] = "vagrant box prune --name #{config[:box]}"
|
322
|
+
end
|
323
|
+
|
302
324
|
# Replaces any `{{vagrant_root}}` tokens in the pre create command.
|
303
325
|
#
|
304
326
|
# @api private
|
@@ -461,6 +483,20 @@ module Kitchen
|
|
461
483
|
end
|
462
484
|
# rubocop:enable Metrics/CyclomaticComplexity
|
463
485
|
|
486
|
+
# Tell vagrant to update vagrant box to latest version
|
487
|
+
def run_box_auto_update
|
488
|
+
if config[:box_auto_update]
|
489
|
+
run(config[:box_auto_update])
|
490
|
+
end
|
491
|
+
end
|
492
|
+
|
493
|
+
# Tell vagrant to remove older vagrant boxes
|
494
|
+
def run_box_auto_prune
|
495
|
+
if config[:box_auto_prune]
|
496
|
+
run(config[:box_auto_prune])
|
497
|
+
end
|
498
|
+
end
|
499
|
+
|
464
500
|
# Runs a local command before `vagrant up` has been called.
|
465
501
|
#
|
466
502
|
# @api private
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: kitchen-vagrant
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.7.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Fletcher Nichol
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-08-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: test-kitchen
|
@@ -117,7 +117,7 @@ homepage: https://github.com/test-kitchen/kitchen-vagrant/
|
|
117
117
|
licenses:
|
118
118
|
- Apache-2.0
|
119
119
|
metadata: {}
|
120
|
-
post_install_message:
|
120
|
+
post_install_message:
|
121
121
|
rdoc_options: []
|
122
122
|
require_paths:
|
123
123
|
- lib
|
@@ -132,8 +132,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
132
132
|
- !ruby/object:Gem::Version
|
133
133
|
version: '0'
|
134
134
|
requirements: []
|
135
|
-
rubygems_version: 3.
|
136
|
-
signing_key:
|
135
|
+
rubygems_version: 3.1.2
|
136
|
+
signing_key:
|
137
137
|
specification_version: 4
|
138
138
|
summary: Kitchen::Driver::Vagrant - A Vagrant Driver for Test Kitchen.
|
139
139
|
test_files: []
|