kitchen-docker_cli 0.14.2 → 0.15.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/CHANGELOG.md +4 -0
- data/README.md +13 -0
- data/lib/kitchen/driver/docker_cli.rb +13 -10
- data/lib/kitchen/driver/docker_cli_version.rb +1 -1
- data/spec/kitchen/driver/docker_cli_spec.rb +14 -0
- 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: 269cdc729259a150aabef82e1130c4f34b13696d
|
4
|
+
data.tar.gz: df9fc2594c21b0ac3deb39edf64fc8c776be291b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ce42a96a832da5482c73175da995aee0337b1124ed063d10b3dc967379e5fddef5d749a51e86c9ea47e04c12b9fb521558d1d3bf88c3cdcfe73799db5ce70161
|
7
|
+
data.tar.gz: 9169f49be1e7593484c5f2db6c1fbac998737d5897b98b6d5618b898253ae7da2a4425a2109103f54847325f89874f4dcbf7472e9b694f85ea73f19dcc9a973e
|
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -141,6 +141,19 @@ Examples:
|
|
141
141
|
no_cache: true
|
142
142
|
```
|
143
143
|
|
144
|
+
### skip_preparation
|
145
|
+
|
146
|
+
Skip the automatically preparation in the step to building Docker image.
|
147
|
+
(i.e. Just pulling the image)
|
148
|
+
|
149
|
+
The default value is `false`.
|
150
|
+
|
151
|
+
Examples:
|
152
|
+
|
153
|
+
```yml
|
154
|
+
skip_preparation: true
|
155
|
+
```
|
156
|
+
|
144
157
|
### privileged
|
145
158
|
|
146
159
|
Give extended privileges to the suite container.
|
@@ -35,6 +35,7 @@ module Kitchen
|
|
35
35
|
default_config :instance_host_name, false
|
36
36
|
default_config :transport, "docker_cli"
|
37
37
|
default_config :dockerfile_vars, {}
|
38
|
+
default_config :skip_preparation, false
|
38
39
|
|
39
40
|
default_config :image do |driver|
|
40
41
|
driver.default_image
|
@@ -142,16 +143,18 @@ module Kitchen
|
|
142
143
|
).result
|
143
144
|
else
|
144
145
|
file = ["FROM #{config[:image]}"]
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
146
|
+
unless config[:skip_preparation]
|
147
|
+
case config[:platform]
|
148
|
+
when 'debian', 'ubuntu'
|
149
|
+
file << 'RUN apt-get update'
|
150
|
+
file << 'RUN apt-get -y install sudo curl tar'
|
151
|
+
when 'rhel', 'centos', 'fedora'
|
152
|
+
file << 'RUN yum clean all'
|
153
|
+
file << 'RUN yum -y install sudo curl tar'
|
154
|
+
file << 'RUN echo "Defaults:root !requiretty" >> /etc/sudoers'
|
155
|
+
else
|
156
|
+
# TODO: Support other distribution
|
157
|
+
end
|
155
158
|
end
|
156
159
|
Array(config[:environment]).each { |env, value| file << "ENV #{env}=#{value}" }
|
157
160
|
Array(config[:run_command]).each { |cmd| file << "RUN #{cmd}" }
|
@@ -214,6 +214,20 @@ describe Kitchen::Driver::DockerCli, "#docker_file" do
|
|
214
214
|
end
|
215
215
|
end
|
216
216
|
|
217
|
+
context 'enable skip_preparation' do
|
218
|
+
let(:config) do
|
219
|
+
{
|
220
|
+
image: "centos/centos6",
|
221
|
+
platform: "centos",
|
222
|
+
skip_preparation: true
|
223
|
+
}
|
224
|
+
end
|
225
|
+
example do
|
226
|
+
ret = "FROM centos/centos6"
|
227
|
+
expect(@docker_cli.send(:docker_file)).to eq ret
|
228
|
+
end
|
229
|
+
end
|
230
|
+
|
217
231
|
context 'set run_command' do
|
218
232
|
let(:config) {
|
219
233
|
{
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: kitchen-docker_cli
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.15.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Masashi Terui
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2016-03-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: test-kitchen
|