kitchen-docker_adv 0.0.1 → 0.0.2
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.
@@ -32,9 +32,7 @@ module Kitchen
|
|
32
32
|
default_config :socket, 'unix:///var/run/docker.sock'
|
33
33
|
default_config :privileged, true
|
34
34
|
default_config :capadd, true
|
35
|
-
default_config :
|
36
|
-
default_config :branch, 'trunk'
|
37
|
-
default_config :regression, 'V0.0.0'
|
35
|
+
default_config :applications, []
|
38
36
|
default_config :environment, 'integration'
|
39
37
|
default_config :use_cache, true
|
40
38
|
default_config :remove_images, false
|
@@ -71,6 +69,18 @@ module Kitchen
|
|
71
69
|
'You must first install the Docker CLI tool http://www.docker.io/gettingstarted/'
|
72
70
|
end
|
73
71
|
|
72
|
+
def build_applications_list()
|
73
|
+
applications=config[:applications]
|
74
|
+
apps = Array.new
|
75
|
+
applications.each do | application |
|
76
|
+
code = application[:code]
|
77
|
+
branch = application[:branch]
|
78
|
+
apps << "#{code}=#{branch}"
|
79
|
+
end
|
80
|
+
|
81
|
+
return "#{apps.join(':')}"
|
82
|
+
end
|
83
|
+
|
74
84
|
def default_image
|
75
85
|
platform, release = instance.platform.name.split('-')
|
76
86
|
if platform == "centos" && release
|
@@ -188,9 +198,7 @@ module Kitchen
|
|
188
198
|
def build_image(state)
|
189
199
|
cmd = "build"
|
190
200
|
cmd << " --no-cache" unless config[:use_cache]
|
191
|
-
cmd << " --build-arg
|
192
|
-
cmd << " --build-arg branch=#{config[:branch]}" if config[:branch]
|
193
|
-
cmd << " --build-arg regression=#{config[:regression]}" if config[:regression]
|
201
|
+
cmd << " --build-arg applications=#{build_applications_list()}"
|
194
202
|
cmd << " --build-arg environment=#{config[:environment]}" if config[:environment]
|
195
203
|
cmd << " --build-arg svn_base=#{config[:svn_base]}" if config[:svn_base]
|
196
204
|
cmd << " --build-arg svn_user=#{config[:svn_user]}" if config[:svn_user]
|
@@ -224,9 +232,6 @@ module Kitchen
|
|
224
232
|
cmd << " -e http_proxy='#{config[:http_proxy]}'" if config[:http_proxy]
|
225
233
|
cmd << " -p 3000:3000" if config[:rails]
|
226
234
|
cmd << " -e https_proxy='#{config[:https_proxy]}'" if config[:https_proxy]
|
227
|
-
cmd << " -e module=#{config[:module]}"
|
228
|
-
cmd << " -e branch=#{config[:branch]}"
|
229
|
-
cmd << " -e regression=#{config[:regression]}"
|
230
235
|
cmd << " -e environment=#{config[:environment]}"
|
231
236
|
cmd << " -e svn_base=#{config[:svn_base]}"
|
232
237
|
cmd << " -e svn_user=#{config[:svn_user]}"
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: kitchen-docker_adv
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2016-05-
|
12
|
+
date: 2016-05-25 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: test-kitchen
|