canzea 0.1.154 → 0.1.155

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 71b01b5c047288fe116dc85fa49b141963907aae
4
- data.tar.gz: 0e0b2486a7cf2ad2b506c73b9193b50d70fe6a42
3
+ metadata.gz: a749973ddbc778253e8def9cb73cd155f78b2267
4
+ data.tar.gz: 80e169252d67de0ec091da799ffa09c484521b25
5
5
  SHA512:
6
- metadata.gz: 12a29b7de618b0dbf7f02606a8bf89f55b0ffcf492ba419db1b0f06cd13e4c4a6963e5fa18af73e4d6f0924cd246aa1da3901414978d114676d79f11a7a770f8
7
- data.tar.gz: cc72e1afd22f20b63e5da602dda3b09389cf690c601dd97862f3a36cbd9c255165de749812518e3f1392800da0f41b03e67bcd30f402a99676d31f41afe1f7ad
6
+ metadata.gz: 6e4b534c43c5d872888b92b3fcdfa860d3c3e0bd20ed8886d5d9f6fa97d42736caaadec9d8b3d6b96c6da2602efe8bca1e59f9cf3d72530810e40b7beb911c24
7
+ data.tar.gz: 43d8771a9366464c9622a7971941e3f0da8fceaeb4c3cd9a84d7fce8db17c9e604b765fd8d004baea377a5a1bc6a3cc68a22ece160a7aa06c433a4a8fc8a1a6a
@@ -1,3 +1,3 @@
1
1
  module Canzea
2
- VERSION = "0.1.154"
2
+ VERSION = "0.1.155"
3
3
  end
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
- phases.each { | phase |
153
- basePath = "#{Pathname.new(Canzea::config[:catalog_location]).realpath}"
154
- cmd = "#{basePath}/roles/#{opts[:role]}/#{opts[:solution]}/#{phase}.sh"
155
- if File.exists? cmd
156
- list += Worker.new.find (cmd)
157
- end
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
@@ -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
- puts "-- ERROR #{root} does not exist!"
38
- raise "#{root} does not exist!"
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 = "#{@basePath}/roles/#{item['role']}/#{item['solution']}/install.sh"
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
- log "-- ERROR #{root} does not exist!"
79
- raise "#{root} does not exist!"
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 = "#{@basePath}/roles/#{item['role']}/#{item['solution']}/metadata.json"
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 = "#{@basePath}/roles/#{item['role']}/#{item['solution']}/environment.json"
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 = "#{@basePath}/roles/#{item['role']}/#{item['solution']}/configure.sh"
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 = "#{@basePath}/roles/#{item['role']}/#{item['solution']}/enable.sh"
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 = "#{@basePath}/roles/#{item['role']}/#{item['solution']}/status.sh"
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.154
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-01-03 00:00:00.000000000 Z
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.4.5.1
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.