alpha_omega 0.0.57 → 0.0.58
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.
- data/lib/alpha_omega/deploy.rb +1 -0
- data/lib/alpha_omega/utils.rb +11 -3
- data/lib/alpha_omega/version.rb +1 -1
- metadata +3 -3
data/lib/alpha_omega/deploy.rb
CHANGED
data/lib/alpha_omega/utils.rb
CHANGED
@@ -3,7 +3,7 @@ require 'capistrano'
|
|
3
3
|
module AlphaOmega
|
4
4
|
|
5
5
|
def self.default_pods_tasks
|
6
|
-
Proc.new do |config, pod_name, pod|
|
6
|
+
Proc.new do |config, pod_name, pod, mix_pods|
|
7
7
|
# each pod task sets the pod context for host/group tasks
|
8
8
|
config.task pod_name do
|
9
9
|
set :current_pod, pod_name
|
@@ -21,6 +21,14 @@ module AlphaOmega
|
|
21
21
|
end
|
22
22
|
|
23
23
|
AlphaOmega.what_groups hosts do |task_name, nodes|
|
24
|
+
unless mix_pods
|
25
|
+
if last_pod && last_pod != pod_name
|
26
|
+
puts "ERROR: cannot call tasks that mix different dc_env (last pod = #{last_pod}, current pod = #{pod_name})"
|
27
|
+
exit 1
|
28
|
+
end
|
29
|
+
end
|
30
|
+
|
31
|
+
set :last_pod, pod_name
|
24
32
|
config.task "#{task_name}.#{pod_name}" do
|
25
33
|
nodes.keys.sort.each do |remote_name|
|
26
34
|
role :app, remote_name
|
@@ -34,8 +42,8 @@ module AlphaOmega
|
|
34
42
|
end
|
35
43
|
end
|
36
44
|
|
37
|
-
def self.setup_pods (config, node_home)
|
38
|
-
self.what_pods(config, node_home) { |config, pod_name, pod| self.default_pods_tasks.call(config, pod_name, pod) }
|
45
|
+
def self.setup_pods (config, node_home, mix_pods = false)
|
46
|
+
self.what_pods(config, node_home) { |config, pod_name, pod| self.default_pods_tasks.call(config, pod_name, pod, mix_pods) }
|
39
47
|
end
|
40
48
|
|
41
49
|
def self.what_branch (allowed = %w(production master develop))
|
data/lib/alpha_omega/version.rb
CHANGED
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: alpha_omega
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 107
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 0.0.
|
9
|
+
- 58
|
10
|
+
version: 0.0.58
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- David Nghiem
|