Sha256: a827b575c99005b0ac35e7452a206510bcc7da129abb8fed0894297e0a381c45
Contents?: true
Size: 1.15 KB
Versions: 10
Compression:
Stored size: 1.15 KB
Contents
require 'json' require 'logger' require 'commands/add-env' require 'plan-step-class' class ApplyConfig def initialize () @log = Logger.new(Canzea::config[:logging_root] + '/plans.log') end def do (gitRoot, test = false, stepNum = nil, task = nil) ps = PlanStep.new # Read the configuration file and make calls out to run @log.info("Processing #{gitRoot}/configure.json") puts "Processing #{gitRoot}/configure.json" steps = JSON.parse(File.read("#{gitRoot}/configure.json")) index = 1 steps["steps"].each { | step | AddEnv.new.injectEnvironmentVariables() role = step['role'] solution = step['solution'] puts "#{stepNum} and #{index}" if (stepNum == nil or index >= Integer(stepNum)) @log.info "[#{index}] Configure for #{role} and #{solution}" ps.runPhaseConfigure role, solution, test, (task == nil ? 1:task) task = 1 else @log.info "[#{index}] Configure for #{role} and #{solution} SKIP" end index = index + 1 } end end
Version data entries
10 entries across 10 versions & 1 rubygems