clc-promote 0.8.0 → 0.8.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/promote/promoter.rb +2 -2
- data/lib/promote/rake_tasks.rb +2 -2
- data/lib/promote/version.rb +1 -1
- data/spec/unit/promote/promoter_spec.rb +3 -3
- 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: c9170560e1bf8c16a5798bd773d9cc4bfef23516
|
4
|
+
data.tar.gz: 01b3e175efef8c94b18641cf7c0013970cef6464
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9a7153de0b612ad26dc19c73f358bb96eb30c669fa0a20c66e573194d74463828320f3420c48d6ea880c6b938ddb2f40e7e120e128157f4afa338133f8cce941
|
7
|
+
data.tar.gz: d8817ff31d88a6cd20118d746132023c4f18b954afbacca5b8d9267d5bd832f645e89b6054f36f56e54552b4c3a1b6a16831c7f233498d0a8ceacdcac3fff837
|
data/lib/promote/promoter.rb
CHANGED
@@ -20,14 +20,14 @@ module Promote
|
|
20
20
|
dest.write_cookbook_versions(source.cookbook_versions)
|
21
21
|
end
|
22
22
|
|
23
|
-
def monitor_promotion(source_environment, destination_environments, probe_interval, max_wait = 3600, ui = nil)
|
23
|
+
def monitor_promotion(source_environment, destination_environments, probe_interval, force = false, max_wait = 3600, ui = nil)
|
24
24
|
ui.info "Waiting for #{source_environment} to finish" if ui
|
25
25
|
check_promotion(source_environment, probe_interval, max_wait, ui)
|
26
26
|
|
27
27
|
uploader = Uploader.new(config)
|
28
28
|
|
29
29
|
destination_environments.each do |env|
|
30
|
-
ui.confirm "Promote #{source_environment} to #{env}" if ui
|
30
|
+
ui.confirm "Promote #{source_environment} to #{env}" if ui && !force
|
31
31
|
promote_to(source_environment, env, ui)
|
32
32
|
uploader.upload_environment(env, ui)
|
33
33
|
|
data/lib/promote/rake_tasks.rb
CHANGED
@@ -109,10 +109,10 @@ module Promote
|
|
109
109
|
def define_promote_environments
|
110
110
|
namespace "Promote" do
|
111
111
|
desc "Promote a list of environments from another"
|
112
|
-
task "promote_environments", :source_environment, :destination_environments do |task, args|
|
112
|
+
task "promote_environments", :source_environment, :destination_environments, :force do |task, args|
|
113
113
|
puts "Promoting constraints in #{args.source_environment} to #{args.destination_environments}"
|
114
114
|
ui = Chef::Knife::UI.new(STDOUT, STDERR, STDIN, {})
|
115
|
-
@promoter.monitor_promotion(args.source_environment, args.destination_environments.split(' '), 5, 3600, ui)
|
115
|
+
@promoter.monitor_promotion(args.source_environment, args.destination_environments.split(' '), 5, args.force, 3600, ui)
|
116
116
|
end
|
117
117
|
end
|
118
118
|
end
|
data/lib/promote/version.rb
CHANGED
@@ -89,7 +89,7 @@ describe Promote::Promoter do
|
|
89
89
|
expect(subject).to receive(:promote_to).with("env1", env, ui)
|
90
90
|
expect(uploader).to receive(:upload_environment).with(env, ui)
|
91
91
|
end
|
92
|
-
subject.monitor_promotion("env1", ["env2", "env3", "env4"], 0.25, 1, ui)
|
92
|
+
subject.monitor_promotion("env1", ["env2", "env3", "env4"], 0.25, false, 1, ui)
|
93
93
|
end
|
94
94
|
end
|
95
95
|
|
@@ -102,7 +102,7 @@ describe Promote::Promoter do
|
|
102
102
|
expect(subject).not_to receive(:promote_to)
|
103
103
|
expect(uploader).not_to receive(:upload_environment)
|
104
104
|
|
105
|
-
expect{ subject.monitor_promotion("env1", ["env2", "env3", "env4"], 0.25, 1, ui) }.to raise_error(/env1$/)
|
105
|
+
expect{ subject.monitor_promotion("env1", ["env2", "env3", "env4"], 0.25, false, 1, ui) }.to raise_error(/env1$/)
|
106
106
|
end
|
107
107
|
end
|
108
108
|
|
@@ -118,7 +118,7 @@ describe Promote::Promoter do
|
|
118
118
|
end
|
119
119
|
expect(subject).not_to receive(:promote_to).with("env1", "env4", ui)
|
120
120
|
expect(uploader).not_to receive(:upload_environment).with("env4")
|
121
|
-
expect{ subject.monitor_promotion("env1", ["env2", "env3", "env4"], 0.25, 1, ui) }.to raise_error(/env3$/)
|
121
|
+
expect{ subject.monitor_promotion("env1", ["env2", "env3", "env4"], 0.25, false, 1, ui) }.to raise_error(/env3$/)
|
122
122
|
end
|
123
123
|
end
|
124
124
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: clc-promote
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.8.
|
4
|
+
version: 0.8.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- CenturyLink Cloud
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-03-
|
11
|
+
date: 2015-03-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: clc-git
|