beaker-docker 0.5.0 → 0.5.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/docker.md +16 -0
- data/lib/beaker-docker/version.rb +1 -1
- data/lib/beaker/hypervisor/docker.rb +4 -0
- data/spec/beaker/hypervisor/docker_spec.rb +13 -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: 61c733455ecbe5428c46686a20f1b05359a1d041
|
4
|
+
data.tar.gz: d48dc931bf23a9aabd859a8ed76785748ee4741a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9124af34731fff5cbae59a7d17423435c6d402036872e4743360b41200f1dd12094faceb8d1745b0f4480b84e51354d31175cd32302a24cd7ed518d311016a90
|
7
|
+
data.tar.gz: dac7775e11a3df94beb402d0a600cf8e8eff3c2d6e1874390207cb4d3e79316d747c6ed811a587022906909227f884bfc966543875507655e9a4ac4854769206
|
data/docker.md
CHANGED
@@ -86,6 +86,22 @@ Unless the image configuration changes you might want to keep the Docker image f
|
|
86
86
|
CONFIG:
|
87
87
|
type: foss
|
88
88
|
|
89
|
+
### Tag a built Docker Image ###
|
90
|
+
Tag an image after creation; this allows for subsequent hosts to reference that image for multi-stage builds.
|
91
|
+
|
92
|
+
HOSTS:
|
93
|
+
ubuntu-12-10:
|
94
|
+
platform: ubuntu-12.10-x64
|
95
|
+
dockerfile: path/to/file
|
96
|
+
hypervisor: docker
|
97
|
+
tag: build_host
|
98
|
+
mysecondhost:
|
99
|
+
dockerfile: path/to/file # file references build_host
|
100
|
+
platform: alpine-3.8-x86_64
|
101
|
+
hypervisor: docker
|
102
|
+
CONFIG:
|
103
|
+
type: foss
|
104
|
+
|
89
105
|
### Reuse Docker Image ###
|
90
106
|
In case you want to rerun the puppet again on the docker container, you can pass BEAKER_provision=no on the command line to set the env. Add this line in you default.ml file
|
91
107
|
|
@@ -90,6 +90,10 @@ module Beaker
|
|
90
90
|
{ rm: true, buildargs: buildargs_for(host) })
|
91
91
|
end
|
92
92
|
|
93
|
+
if host['tag']
|
94
|
+
image.tag({:repo => host['tag']})
|
95
|
+
end
|
96
|
+
|
93
97
|
if @docker_type == 'swarm'
|
94
98
|
image_name = "#{@registry}/beaker/#{image.id}"
|
95
99
|
ret = ::Docker::Image.search(:term => image_name)
|
@@ -196,6 +196,19 @@ module Beaker
|
|
196
196
|
allow( docker ).to receive(:dockerfile_for)
|
197
197
|
end
|
198
198
|
|
199
|
+
context 'when the host has "tag" defined' do
|
200
|
+
before :each do
|
201
|
+
hosts.each do |host|
|
202
|
+
host['tag'] = 'my_tag'
|
203
|
+
end
|
204
|
+
end
|
205
|
+
|
206
|
+
it 'will tag the image with the value of the tag' do
|
207
|
+
expect( image ).to receive(:tag).with({:repo => 'my_tag'}).exactly(3).times
|
208
|
+
docker.provision
|
209
|
+
end
|
210
|
+
end
|
211
|
+
|
199
212
|
context 'when the host has "use_image_entry_point" set to true on the host' do
|
200
213
|
|
201
214
|
before :each do
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: beaker-docker
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.
|
4
|
+
version: 0.5.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Rishi Javia, Kevin Imber, Tony Vu
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-11-
|
11
|
+
date: 2018-11-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rspec
|