kitchen-docker_cli 0.14.0 → 0.14.1
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/.travis.yml +2 -1
- data/CHANGELOG.md +7 -1
- data/README.md +23 -3
- data/lib/kitchen/driver/docker_cli.rb +6 -1
- data/lib/kitchen/driver/docker_cli_version.rb +1 -1
- data/spec/kitchen/driver/docker_cli_spec.rb +9 -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: c1aebbb2fe16364552a69eaac3fd4241ebea7339
|
4
|
+
data.tar.gz: d0598beca61df19715ba59d7aa9616cf379340ac
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cf2689759559525535b995598d63cbb56ecedb2f798bf7a74fb795f47aa53dc74d884bc04b6c1bd2015c24eee6d08dbe6a05b3d66f6c10d70f2eb4c4552631ca
|
7
|
+
data.tar.gz: 3603decf5026b403fe1e7dfacdadfefdceffffda1027c0914f3abfdc7f9cb3c8b73e22ac7a1ffd91e8ee5581272320d610edc3271889991467579728f838edfd
|
data/.travis.yml
CHANGED
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,7 @@
|
|
1
|
+
## 0.14.1
|
2
|
+
|
3
|
+
* Pull request [#23][]: Add `build_context` option to pass Docker build context ([@nrvale0][])
|
4
|
+
|
1
5
|
## 0.14.0
|
2
6
|
|
3
7
|
* Pull request [#21][]: Support `--add-host` option ([@sawanoboly][])
|
@@ -101,7 +105,9 @@
|
|
101
105
|
[#17]: https://github.com/marcy-terui/kitchen-docker_cli/issues/17
|
102
106
|
[#18]: https://github.com/marcy-terui/kitchen-docker_cli/issues/18
|
103
107
|
[#21]: https://github.com/marcy-terui/kitchen-docker_cli/issues/21
|
108
|
+
[#23]: https://github.com/marcy-terui/kitchen-docker_cli/issues/23
|
104
109
|
[@grubernaut]: https://github.com/grubernaut
|
105
110
|
[@hd-deman]: https://github.com/hd-deman
|
111
|
+
[@nrvale0]: https://github.com/nrvale0
|
106
112
|
[@sawanoboly]: https://github.com/sawanoboly
|
107
|
-
[@yewton]: https://github.com/yewton
|
113
|
+
[@yewton]: https://github.com/yewton
|
data/README.md
CHANGED
@@ -125,6 +125,10 @@ environment:
|
|
125
125
|
LANG: ja_JP.UTF-8
|
126
126
|
```
|
127
127
|
|
128
|
+
### build_context
|
129
|
+
|
130
|
+
Pass the basedir as the Docker build context: 'docker build <options> .' Default is 'false'.
|
131
|
+
|
128
132
|
### no_cache
|
129
133
|
|
130
134
|
Not use the cached image on `docker build`.
|
@@ -268,9 +272,25 @@ Examples:
|
|
268
272
|
```
|
269
273
|
|
270
274
|
```yml
|
271
|
-
expose:
|
272
|
-
|
273
|
-
|
275
|
+
expose:
|
276
|
+
- 80
|
277
|
+
- 22
|
278
|
+
```
|
279
|
+
|
280
|
+
### add_host
|
281
|
+
|
282
|
+
Add additional lines to `/etc/hosts`.
|
283
|
+
|
284
|
+
Examples:
|
285
|
+
|
286
|
+
```yml
|
287
|
+
add_host: myhost:127.0.0.1
|
288
|
+
```
|
289
|
+
|
290
|
+
```yml
|
291
|
+
add_host:
|
292
|
+
- myhost:127.0.0.1
|
293
|
+
- yourhost:123.123.123.123
|
274
294
|
```
|
275
295
|
|
276
296
|
### volume
|
@@ -29,6 +29,7 @@ module Kitchen
|
|
29
29
|
class DockerCli < Kitchen::Driver::Base
|
30
30
|
|
31
31
|
default_config :no_cache, false
|
32
|
+
default_config :build_context, false
|
32
33
|
default_config :command, 'sh -c \'while true; do sleep 1d; done;\''
|
33
34
|
default_config :privileged, false
|
34
35
|
default_config :instance_host_name, false
|
@@ -85,7 +86,11 @@ module Kitchen
|
|
85
86
|
def docker_build_command
|
86
87
|
cmd = String.new('build')
|
87
88
|
cmd << ' --no-cache' if config[:no_cache]
|
88
|
-
|
89
|
+
if config[:build_context]
|
90
|
+
cmd << ' .'
|
91
|
+
else
|
92
|
+
cmd << ' -'
|
93
|
+
end
|
89
94
|
end
|
90
95
|
|
91
96
|
def docker_run_command(image)
|
@@ -74,6 +74,14 @@ describe Kitchen::Driver::DockerCli, "docker_build_command" do
|
|
74
74
|
@docker_cli = Kitchen::Driver::DockerCli.new(config)
|
75
75
|
end
|
76
76
|
|
77
|
+
context 'build_context' do
|
78
|
+
let(:config) { {:build_context => true} }
|
79
|
+
|
80
|
+
example do
|
81
|
+
expect(@docker_cli.docker_build_command).to eq 'build .'
|
82
|
+
end
|
83
|
+
end
|
84
|
+
|
77
85
|
context 'default' do
|
78
86
|
let(:config) { {:no_cache => true} }
|
79
87
|
|
@@ -89,6 +97,7 @@ describe Kitchen::Driver::DockerCli, "docker_build_command" do
|
|
89
97
|
expect(@docker_cli.docker_build_command).to eq 'build -'
|
90
98
|
end
|
91
99
|
end
|
100
|
+
|
92
101
|
end
|
93
102
|
|
94
103
|
describe Kitchen::Driver::DockerCli, "docker_run_command" do
|
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.14.
|
4
|
+
version: 0.14.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Masashi Terui
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-10-
|
11
|
+
date: 2015-10-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: test-kitchen
|