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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 3269fa4b33bf25f161bcd1af841c00cce6f2cbe6
4
- data.tar.gz: af1dc072ceb79cb73c0781ec776527d23c150875
3
+ metadata.gz: 269cdc729259a150aabef82e1130c4f34b13696d
4
+ data.tar.gz: df9fc2594c21b0ac3deb39edf64fc8c776be291b
5
5
  SHA512:
6
- metadata.gz: d875cd82bf9fe83e52b2c179f3968068b6a40d9b57338456b7b6dba0295d268907639efe7f3aa92c5d62747d00f4586f3e83ff41c58095baf4bba6e4c3d965fe
7
- data.tar.gz: 39463c201c7f8ef0f01d3671ac196a62e3c5bbadd217ad3c243cca83b6664c3a6908d79c3d63169063ac2d603e0e4b1b552c5e9ae1fa8c85ed95711efdae47fa
6
+ metadata.gz: ce42a96a832da5482c73175da995aee0337b1124ed063d10b3dc967379e5fddef5d749a51e86c9ea47e04c12b9fb521558d1d3bf88c3cdcfe73799db5ce70161
7
+ data.tar.gz: 9169f49be1e7593484c5f2db6c1fbac998737d5897b98b6d5618b898253ae7da2a4425a2109103f54847325f89874f4dcbf7472e9b694f85ea73f19dcc9a973e
data/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ ## 0.15.0
2
+
3
+ - Add `skip_preparation` option
4
+
1
5
  ## 0.14.2
2
6
 
3
7
  * Fix error on Circle-CI
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
- case config[:platform]
146
- when 'debian', 'ubuntu'
147
- file << 'RUN apt-get update'
148
- file << 'RUN apt-get -y install sudo curl tar'
149
- when 'rhel', 'centos', 'fedora'
150
- file << 'RUN yum clean all'
151
- file << 'RUN yum -y install sudo curl tar'
152
- file << 'RUN echo "Defaults:root !requiretty" >> /etc/sudoers'
153
- else
154
- # TODO: Support other distribution
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}" }
@@ -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.2'
24
+ DOCKER_CLI_VERSION = '0.15.0'
25
25
  end
26
26
  end
@@ -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.14.2
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: 2015-12-25 00:00:00.000000000 Z
11
+ date: 2016-03-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: test-kitchen