beaker-docker 0.5.0 → 0.5.1

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: 8a15b0037f264bd2e696038da349f7fc9ab219c7
4
- data.tar.gz: a8a4d98c0cc5a0611938607362e334a2dd289d74
3
+ metadata.gz: 61c733455ecbe5428c46686a20f1b05359a1d041
4
+ data.tar.gz: d48dc931bf23a9aabd859a8ed76785748ee4741a
5
5
  SHA512:
6
- metadata.gz: 7af3da434dbbe522bf039ff513c07d113bdb3da709e622bb9de5eba21a7262237b02e2063d42ef580d0dcd31bd2623a30c8fb897959973bc4dc9d1d7d1d4d33b
7
- data.tar.gz: 833277de264b0000bda06bdbef7a072d0d53c1ac5dab68f0ba5f81dda2e34ca5a815657551a5dcee3a313e57be711bd4843bcd09cc1e9d85cb53a5a81dcc4784
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
 
@@ -1,3 +1,3 @@
1
1
  module BeakerDocker
2
- VERSION = '0.5.0'
2
+ VERSION = '0.5.1'
3
3
  end
@@ -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.0
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-19 00:00:00.000000000 Z
11
+ date: 2018-11-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rspec