kitchen-docker_cli 0.15.1 → 0.16.0

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: 6defa165a7c612346eaad601d37264298d86862d
4
- data.tar.gz: b9a39bbdc29c976d04c25d8942de68f4648c0018
3
+ metadata.gz: 9d028d23a49fb2312efb4fa63ec1e7e3830d80c7
4
+ data.tar.gz: c47a6d396d48d043e970ae52c98b73dec27fd5e0
5
5
  SHA512:
6
- metadata.gz: 87e392d0a452cee0e742e0541d4e2201160772a7870ccf516dbfc7d54fe451238776fa9f256a46c9b006289f22742e042be0cc021c0ad2d285e3f2350f890997
7
- data.tar.gz: 8f7790ae15cbc31fba83d18f36f17e88e109e1bf2ab4e5162decc5d93b7feb095e03224a8723ee66c7e3dc7f6aeaf3035c1444b53e8c0285e460498b4cce26e6
6
+ metadata.gz: 2b932f1850b9c00dc0468d1756d5e3b3a834e0283ba9ee9dcdacc6f5ac1411159e0261e13d412fbbe74617c63ad0653db18faba03bf4acc182d7cf908856157e
7
+ data.tar.gz: 2bb0a5327f95d3ed40f40dcc97a49eb5cdd532fe3b4c74ac10527531cc2653597b39b2f72b5c85e3ed380b0b1e34c463953c71cfa57106e62d503131af79e3e4
@@ -1,3 +1,7 @@
1
+ ## 0.16.0
2
+
3
+ * Pull request [#31][]: Add instance_container_name option ([@s-bernard][])
4
+
1
5
  ## 0.15.1
2
6
 
3
7
  * Pull request [#30][]: Fix [#29][]: use docker cp to upload files ([@s-bernard][])
@@ -8,7 +12,7 @@
8
12
 
9
13
  ## 0.14.2
10
14
 
11
- * Fix error on Circle-CI
15
+ * Fix error on Circle CI
12
16
 
13
17
  ## 0.14.1
14
18
 
@@ -125,4 +129,4 @@
125
129
  [@nrvale0]: https://github.com/nrvale0
126
130
  [@s-bernard]: https://github.com/s-bernard
127
131
  [@sawanoboly]: https://github.com/sawanoboly
128
- [@yewton]: https://github.com/yewton
132
+ [@yewton]: https://github.com/yewton
data/README.md CHANGED
@@ -176,6 +176,18 @@ Examples:
176
176
  container_name: web
177
177
  ```
178
178
 
179
+ ### instance_container_name
180
+
181
+ Use instance name to container_name.
182
+
183
+ The default value is `false`.
184
+
185
+ Examples:
186
+
187
+ ```yml
188
+ instance_container_name: true
189
+ ```
190
+
179
191
  ### network
180
192
 
181
193
  Set the Network mode for the container.
@@ -201,6 +213,7 @@ Examples:
201
213
  ```
202
214
 
203
215
  ### instance_host_name
216
+
204
217
  Use instance name to hostname.
205
218
 
206
219
  The default value is `false`.
@@ -33,6 +33,7 @@ module Kitchen
33
33
  default_config :command, 'sh -c \'while true; do sleep 1d; done;\''
34
34
  default_config :privileged, false
35
35
  default_config :instance_host_name, false
36
+ default_config :instance_container_name, false
36
37
  default_config :transport, "docker_cli"
37
38
  default_config :dockerfile_vars, {}
38
39
  default_config :skip_preparation, false
@@ -100,7 +101,11 @@ module Kitchen
100
101
 
101
102
  def docker_run_command(image)
102
103
  cmd = String.new("run -d -t")
103
- cmd << " --name #{config[:container_name]}" if config[:container_name]
104
+ if config[:container_name]
105
+ cmd << " --name #{config[:container_name]}"
106
+ elsif config[:instance_container_name]
107
+ cmd << " --name #{instance.name}"
108
+ end
104
109
  cmd << ' -P' if config[:publish_all]
105
110
  cmd << " -m #{config[:memory_limit]}" if config[:memory_limit]
106
111
  cmd << " -c #{config[:cpu_shares]}" if config[:cpu_shares]
@@ -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.15.1'
24
+ DOCKER_CLI_VERSION = '0.16.0'
25
25
  end
26
26
  end
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.15.1
4
+ version: 0.16.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: 2016-05-05 00:00:00.000000000 Z
11
+ date: 2016-06-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: test-kitchen