kumo_dockercloud 3.5.2 → 3.6.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/kumo_dockercloud/environment.rb +2 -1
- data/lib/kumo_dockercloud/environment_config.rb +3 -2
- data/lib/kumo_dockercloud/version.rb +1 -1
- data/spec/kumo_dockercloud/environment_config_spec.rb +1 -1
- data/spec/kumo_dockercloud/environment_spec.rb +1 -1
- data/spec/kumo_dockercloud/stack_file_spec.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a61588ac93a2752356f447a1e12f0018e93d4613
|
4
|
+
data.tar.gz: 0cb7722cb65d767622aafc944c55e9380eb40ba9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fbdb9a3694b085eb047e82cac2ee4804d2a3761fd553420046add5f08d8458fcd01136babbabb13812b6efa437c59ba27ae29333faf1e33d23456b8d09a58464
|
7
|
+
data.tar.gz: 18288b0d38494c02f63296d265ba24df84cbd4db08d68af6ba9c49da32560ecfb12099847a2a988c0ed33ce8b883c5c5d9fc71bd5aa867015e62451c26cccb24
|
@@ -22,7 +22,8 @@ module KumoDockerCloud
|
|
22
22
|
@timeout = params.fetch(:timeout, 120)
|
23
23
|
@confirmation_timeout = params.fetch(:confirmation_timeout, 30)
|
24
24
|
@app_name = params.fetch(:app_name)
|
25
|
-
@
|
25
|
+
@app_image = params.fetch(:app_image, "redbubble/#{@app_name}:master")
|
26
|
+
@config = EnvironmentConfig.new(app_name: @app_name, env_name: @env_name, config_path: params.fetch(:config_path), app_image: @app_image)
|
26
27
|
@stack = Stack.new(@app_name, @env_name)
|
27
28
|
end
|
28
29
|
|
@@ -12,6 +12,7 @@ module KumoDockerCloud
|
|
12
12
|
@config_path = options.fetch(:config_path)
|
13
13
|
@log = logger
|
14
14
|
@app_name = options.fetch(:app_name)
|
15
|
+
@app_image = options.fetch(:app_image)
|
15
16
|
end
|
16
17
|
|
17
18
|
def get_binding
|
@@ -43,13 +44,13 @@ module KumoDockerCloud
|
|
43
44
|
if existing_image_name?
|
44
45
|
existing_image_name
|
45
46
|
else
|
46
|
-
|
47
|
+
@app_image
|
47
48
|
end
|
48
49
|
end
|
49
50
|
|
50
51
|
def tagged_app_image(service_name)
|
51
52
|
service = docker_cloud_api.service_by_stack_and_service_name(stack_name, service_name)
|
52
|
-
service ? service.image_name :
|
53
|
+
service ? service.image_name : @app_image
|
53
54
|
end
|
54
55
|
|
55
56
|
def image_tag
|
@@ -2,7 +2,7 @@ describe KumoDockerCloud::EnvironmentConfig do
|
|
2
2
|
let(:env_name) { 'test' }
|
3
3
|
let(:app_name) { "app-foo" }
|
4
4
|
let(:config_path) { File.join(__dir__, '../fixtures/config') }
|
5
|
-
subject(:instance) { described_class.new(app_name: app_name, env_name: env_name, config_path: config_path) }
|
5
|
+
subject(:instance) { described_class.new(app_name: app_name, env_name: env_name, config_path: config_path, app_image: "redbubble/app-foo:master") }
|
6
6
|
|
7
7
|
let(:docker_cloud_api) { instance_double('KumoDockerCloud::DockerCloudApi') }
|
8
8
|
before { allow(KumoDockerCloud::DockerCloudApi).to receive(:new).and_return docker_cloud_api }
|
@@ -2,7 +2,7 @@ describe KumoDockerCloud::Environment do
|
|
2
2
|
let(:env_vars) { {app_name => {'KEY' => 'VALUE'}} }
|
3
3
|
let(:app_name) { 'application-stack-name' }
|
4
4
|
let(:env_name) { 'test' }
|
5
|
-
let(:config) { KumoDockerCloud::EnvironmentConfig.new(app_name: app_name, env_name: env_name, config_path: 'a path') }
|
5
|
+
let(:config) { KumoDockerCloud::EnvironmentConfig.new(app_name: app_name, env_name: env_name, config_path: 'a path', app_image: 'a-thing') }
|
6
6
|
|
7
7
|
let(:stack_file) {
|
8
8
|
{
|
@@ -1,7 +1,7 @@
|
|
1
1
|
describe KumoDockerCloud::StackFile do
|
2
2
|
|
3
3
|
let(:app_name) { 'application-stack-name' }
|
4
|
-
let(:config) { KumoDockerCloud::EnvironmentConfig.new(app_name: app_name, env_name: 'test', config_path: 'a path') }
|
4
|
+
let(:config) { KumoDockerCloud::EnvironmentConfig.new(app_name: app_name, env_name: 'test', config_path: 'a path', app_image: 'a-thing') }
|
5
5
|
let(:env_vars) { {app_name => {'KEY' => 'VALUE'}} }
|
6
6
|
let(:plain_text_secrets) do
|
7
7
|
{
|