kitchen-docker_cli 0.3.1 → 0.4.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: d5d519e17cf201875e9f656c36f4ecc2232146de
4
- data.tar.gz: e2de2fd8103333bcf273e18744f576e29fc4601e
3
+ metadata.gz: 6b0d097399f490533674ea2fa855615f81995df6
4
+ data.tar.gz: 60cea728ef7e62c624913c930aabed2445a53d9f
5
5
  SHA512:
6
- metadata.gz: e27530931d45ddda26a12400a592f72b8dc5d92da9c93829ddc2f967221981656fc2e3fd8c1e822206d13cb86d97491867ae32b1729d88cab1989641865198fd
7
- data.tar.gz: d8ad115e33fac799bfbb36c722f84a72633bd604f4ad8391efbc01e9edd098832a0a3276f2968a2adfa4f5d4dbba1aecbfaace707aeb5dede549979e8c72f7f0
6
+ metadata.gz: 7dd67ba5691edebefd8c1d1c47c4fb52bec706fc280e089f065a756bef39fd152ce2348b699fb8c5efb0b5d8b5511fcf8348388780292b97b9e00d039fc94d32
7
+ data.tar.gz: 8a76f858b39728ad3584695a331943e56f689c56a055429063289ec5b6c4e7944edb2063e2754af0457c7c4ce4a39e2098ada126c0dfb5277787df1a841f13ed
data/.kitchen.yml CHANGED
@@ -8,5 +8,3 @@ platforms:
8
8
 
9
9
  suites:
10
10
  - name: default
11
- run_list:
12
- attributes:
data/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ ## 0.4.0
2
+
3
+ * Pull request [#2][]: Add custom `Dockerfile` support ([@grubernaut][])
4
+
1
5
  ## 0.3.1
2
6
 
3
7
  * Change dependency version of `test-kitchen`
@@ -17,3 +21,7 @@
17
21
  ## 0.1.0.alpha
18
22
 
19
23
  * Initial release
24
+
25
+ <!--- The following link definition list is generated by PimpMyChangelog --->
26
+ [#2]: https://github.com/marcy-terui/kitchen-docker_cli/issues/2
27
+ [@grubernaut]: https://github.com/grubernaut
data/README.md CHANGED
@@ -1,17 +1,17 @@
1
1
  # <a name="title"></a> Kitchen::DockerCli [![Gem Version](https://badge.fury.io/rb/kitchen-docker_cli.svg)](http://badge.fury.io/rb/kitchen-docker_cli) [![Build Status](https://travis-ci.org/marcy-terui/kitchen-docker_cli.svg?branch=master)](https://travis-ci.org/marcy-terui/kitchen-docker_cli) [![Coverage Status](https://coveralls.io/repos/marcy-terui/kitchen-docker_cli/badge.png)](https://coveralls.io/r/marcy-terui/kitchen-docker_cli)
2
2
  A Test Kitchen Driver for Docker command line interface.
3
3
 
4
- This plugin is created with only Docker CLI functions.
4
+ This plugin is created with only Docker CLI functions.
5
5
  Therefore, we can test with an environment that has no extra software such as ```sshd```.
6
6
 
7
7
  ## <a name="requirements"></a> Requirements
8
8
 
9
9
  - Test-Kitchen (>= 1.3)
10
10
 
11
- - Docker (>= 1.3)
11
+ - Docker (>= 1.3)
12
12
  This driver uses ```docker exec``` command.
13
13
 
14
- - tar (GNU Tar)
14
+ - tar (GNU Tar)
15
15
 
16
16
  ## <a name="installation"></a> Installation and Setup
17
17
 
@@ -146,8 +146,6 @@ Examples:
146
146
  link: mysql:db
147
147
  ```
148
148
 
149
- Examples:
150
-
151
149
  ```yml
152
150
  link:
153
151
  - mysql:db
@@ -156,7 +154,7 @@ Examples:
156
154
 
157
155
  ### publish_all
158
156
 
159
- Publish all exposed ports to the host interfaces.
157
+ Publish all exposed ports to the host interfaces.
160
158
  This option used to communicate between some containers.
161
159
 
162
160
  The default value is `false`.
@@ -183,6 +181,18 @@ Examples:
183
181
  - <%= Dir::pwd %>:/var:rw
184
182
  ```
185
183
 
184
+ ### dockerfile
185
+
186
+ Create test image using a supplied dockerfile, instead of the default dockerfile created.
187
+ For best results, please:
188
+ - Ensure Package Repositories are updated
189
+ - Ensure Dockerfile installs sudo, curl and tar
190
+ - If Ubuntu/Debian, Set DEBIAN_FRONTEND to noninteractive
191
+
192
+ ```yml
193
+ dockerfile: my/dockerfile
194
+ ```
195
+
186
196
  ## <a name="development"></a> Development
187
197
 
188
198
  * Source hosted at [GitHub][repo]
@@ -170,19 +170,23 @@ module Kitchen
170
170
  end
171
171
 
172
172
  def docker_file
173
- file = ["FROM #{config[:image]}"]
174
- case config[:platform]
175
- when 'debian', 'ubuntu'
176
- file << 'RUN apt-get update'
177
- file << 'RUN apt-get -y install sudo curl tar'
178
- when 'rhel', 'centos'
179
- file << 'RUN yum clean all'
180
- file << 'RUN yum -y install sudo curl tar'
173
+ if config[:dockerfile]
174
+ file = IO.read(File.expand_path(config[:dockerfile]))
181
175
  else
182
- # TODO: Support other distribution
176
+ file = ["FROM #{config[:image]}"]
177
+ case config[:platform]
178
+ when 'debian', 'ubuntu'
179
+ file << 'RUN apt-get update'
180
+ file << 'RUN apt-get -y install sudo curl tar'
181
+ when 'rhel', 'centos'
182
+ file << 'RUN yum clean all'
183
+ file << 'RUN yum -y install sudo curl tar'
184
+ else
185
+ # TODO: Support other distribution
186
+ end
187
+ Array(config[:run_command]).each { |cmd| file << "RUN #{cmd}" }
188
+ file.join("\n")
183
189
  end
184
- Array(config[:run_command]).each { |cmd| file << "RUN #{cmd}" }
185
- file.join("\n")
186
190
  end
187
191
 
188
192
  def execute(cmd, opts = {})
@@ -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.3.1'
24
+ DOCKER_CLI_VERSION = '0.4.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.3.1
4
+ version: 0.4.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-01-23 00:00:00.000000000 Z
11
+ date: 2015-01-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: test-kitchen