canzea 0.1.154 → 0.1.155
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 +4 -4
- data/lib/canzea/version.rb +1 -1
- data/lib/canzea.rb +18 -7
- data/lib/plan-step-class.rb +16 -10
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a749973ddbc778253e8def9cb73cd155f78b2267
|
4
|
+
data.tar.gz: 80e169252d67de0ec091da799ffa09c484521b25
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6e4b534c43c5d872888b92b3fcdfa860d3c3e0bd20ed8886d5d9f6fa97d42736caaadec9d8b3d6b96c6da2602efe8bca1e59f9cf3d72530810e40b7beb911c24
|
7
|
+
data.tar.gz: 43d8771a9366464c9622a7971941e3f0da8fceaeb4c3cd9a84d7fce8db17c9e604b765fd8d004baea377a5a1bc6a3cc68a22ece160a7aa06c433a4a8fc8a1a6a
|
data/lib/canzea/version.rb
CHANGED
data/lib/canzea.rb
CHANGED
@@ -149,13 +149,24 @@ module Canzea
|
|
149
149
|
publicIp = File.read("#{Canzea::config[:pwd]}/vps-#{opts[:serverBase]}-#{opts[:serverNumber]}.json")
|
150
150
|
publicIp.strip!
|
151
151
|
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
152
|
+
root = "#{basePath}/blocks/#{opts[:solution]}"
|
153
|
+
if File.exists? root
|
154
|
+
phases.each { | phase |
|
155
|
+
basePath = "#{Pathname.new(Canzea::config[:catalog_location]).realpath}"
|
156
|
+
cmd = "#{basePath}/blocks/#{opts[:solution]}/#{phase}.sh"
|
157
|
+
if File.exists? cmd
|
158
|
+
list += Worker.new.find (cmd)
|
159
|
+
end
|
160
|
+
}
|
161
|
+
else
|
162
|
+
phases.each { | phase |
|
163
|
+
basePath = "#{Pathname.new(Canzea::config[:catalog_location]).realpath}"
|
164
|
+
cmd = "#{basePath}/roles/#{opts[:role]}/#{opts[:solution]}/#{phase}.sh"
|
165
|
+
if File.exists? cmd
|
166
|
+
list += Worker.new.find (cmd)
|
167
|
+
end
|
168
|
+
}
|
169
|
+
end
|
159
170
|
|
160
171
|
list.each_with_index { | cmd, index |
|
161
172
|
if index >= step
|
data/lib/plan-step-class.rb
CHANGED
@@ -34,11 +34,14 @@ class PlanStep
|
|
34
34
|
|
35
35
|
root = "#{@basePath}/roles/#{item['role']}/#{item['solution']}"
|
36
36
|
if File.exist?(root) == false
|
37
|
-
|
38
|
-
|
37
|
+
root = "#{@basePath}/blocks/#{item['solution']}"
|
38
|
+
if File.exist?(root) == false
|
39
|
+
puts "-- ERROR #{root} does not exist!"
|
40
|
+
raise "#{root} does not exist!"
|
41
|
+
end
|
39
42
|
end
|
40
43
|
|
41
|
-
cmd = "#{
|
44
|
+
cmd = "#{root}/install.sh"
|
42
45
|
if File.exist?(cmd)
|
43
46
|
lines = n.run cmd, start, lines - 1
|
44
47
|
|
@@ -75,14 +78,17 @@ class PlanStep
|
|
75
78
|
|
76
79
|
root = "#{@basePath}/roles/#{item['role']}/#{item['solution']}"
|
77
80
|
if File.exist?(root) == false
|
78
|
-
|
79
|
-
|
81
|
+
root = "#{@basePath}/blocks/#{item['solution']}"
|
82
|
+
if File.exist?(root) == false
|
83
|
+
log "-- ERROR #{root} does not exist!"
|
84
|
+
raise "#{root} does not exist!"
|
85
|
+
end
|
80
86
|
end
|
81
87
|
|
82
88
|
if (test == false)
|
83
89
|
# Register the service with Consul, if consul is ready
|
84
90
|
# If metadata.json exists, then use the information to register
|
85
|
-
cmd = "#{
|
91
|
+
cmd = "#{root}/metadata.json"
|
86
92
|
if File.exist?(cmd)
|
87
93
|
md = File.read(cmd)
|
88
94
|
md = JSON.parse(md)
|
@@ -102,7 +108,7 @@ class PlanStep
|
|
102
108
|
end
|
103
109
|
end
|
104
110
|
|
105
|
-
envScript = "#{
|
111
|
+
envScript = "#{root}/environment.json"
|
106
112
|
if File.exist?(envScript)
|
107
113
|
envPush = PrepareEnvironment.new false
|
108
114
|
envPush.addToEnv "#{envScript}"
|
@@ -110,17 +116,17 @@ class PlanStep
|
|
110
116
|
|
111
117
|
end
|
112
118
|
|
113
|
-
cmd = "#{
|
119
|
+
cmd = "#{root}/configure.sh"
|
114
120
|
if File.exist?(cmd)
|
115
121
|
lines = n.run cmd, start, lines - 1, false, ref
|
116
122
|
end
|
117
123
|
|
118
|
-
cmd = "#{
|
124
|
+
cmd = "#{root}/enable.sh"
|
119
125
|
if File.exist?(cmd)
|
120
126
|
lines = n.run cmd, start, lines - 1, false, ref
|
121
127
|
end
|
122
128
|
|
123
|
-
cmd = "#{
|
129
|
+
cmd = "#{root}/status.sh"
|
124
130
|
if File.exist?(cmd)
|
125
131
|
lines = n.run cmd, start, lines - 1, true, ref
|
126
132
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: canzea
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.155
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Canzea Technologies
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-
|
11
|
+
date: 2018-09-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -191,7 +191,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
191
191
|
version: '0'
|
192
192
|
requirements: []
|
193
193
|
rubyforge_project:
|
194
|
-
rubygems_version: 2.
|
194
|
+
rubygems_version: 2.5.2.3
|
195
195
|
signing_key:
|
196
196
|
specification_version: 4
|
197
197
|
summary: Canzea command line interface for orchestrating builds.
|