11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
|
# File 'lib/canzea/commands/apply-config.rb', line 11
def do (gitRoot, test = false, stepNum = nil, task = nil)
ps = PlanStep.new
log "Processing #{gitRoot}/configure.json"
steps = JSON.parse(File.read("#{gitRoot}/configure.json"))
index = 1
steps["steps"].each { | step |
AddEnv.new.injectEnvironmentVariables()
ref = "Step #{index.to_s.rjust(2, "0")} / #{steps['steps'].length}"
role = step['role']
solution = step['solution']
ENV['ES_STEP'] = "#{index}";
if (stepNum == nil or index >= Integer(stepNum))
log " [#{ref}] Configure for #{role} and #{solution}"
ps.runPhaseConfigure role, solution, test, (task == nil ? 1:task), ref
task = 1
else
log " [#{ref}] Configure for #{role} and #{solution} SKIP"
end
index = index + 1
}
end
|