kitchen-docker_cli 0.14.0 → 0.14.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: bf34c6963a7146a8e728654cf0b4d83553353584
4
- data.tar.gz: a970a92c7193edbcd6fb4745bd00ee1ef8618cd6
3
+ metadata.gz: c1aebbb2fe16364552a69eaac3fd4241ebea7339
4
+ data.tar.gz: d0598beca61df19715ba59d7aa9616cf379340ac
5
5
  SHA512:
6
- metadata.gz: 88dbfa9c5f743e6c7befb74e8df1c940a246fe76df450d82d169fd6d23c4914157cc8b65d5c3843b6aecee8730c273658967840fed9a147567ba276ae996ea0b
7
- data.tar.gz: e3ede63db8cd4b92d69da5957e2e35193e75d796890dfe9b37ec1edcce859c1cc2d15bf0c81d0f2bb5592dbf70b759ecf94b1a1787e5096bc193082a5bcacbff
6
+ metadata.gz: cf2689759559525535b995598d63cbb56ecedb2f798bf7a74fb795f47aa53dc74d884bc04b6c1bd2015c24eee6d08dbe6a05b3d66f6c10d70f2eb4c4552631ca
7
+ data.tar.gz: 3603decf5026b403fe1e7dfacdadfefdceffffda1027c0914f3abfdc7f9cb3c8b73e22ac7a1ffd91e8ee5581272320d610edc3271889991467579728f838edfd
data/.travis.yml CHANGED
@@ -1,7 +1,8 @@
1
1
  language: ruby
2
2
 
3
3
  rvm:
4
- - 2.1
4
+ - 2.2.3
5
+ - 2.1.7
5
6
  - 2.0.0
6
7
  - 1.9.3
7
8
  - ruby-head
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
- - 80
273
- - 22
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
- cmd << ' -'
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)
@@ -21,6 +21,6 @@ module Kitchen
21
21
  module Driver
22
22
 
23
23
  # Version string for DockerCli Kitchen driver
24
- DOCKER_CLI_VERSION = '0.14.0'
24
+ DOCKER_CLI_VERSION = '0.14.1'
25
25
  end
26
26
  end
@@ -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.0
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-15 00:00:00.000000000 Z
11
+ date: 2015-10-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: test-kitchen