lib/repositories.rb in forj-0.0.43 vs lib/repositories.rb in forj-0.0.44

- old
+ new

@@ -54,26 +54,27 @@ Dir.chdir(current_dir) end - def create_infra(maestro_repo) + def create_infra(maestro_repo, branch) # Build our own infra from maestro infra templates. infra = File.join($FORJ_DATA_PATH, 'infra') dest_cloud_init = File.join(infra, 'cloud-init') template = File.join(maestro_repo, 'templates', 'infra') cloud_init = File.join(template, 'cloud-init') if File.directory?(infra) Logging.debug("Cleaning up '%s'" % [infra]) FileUtils.rm_r(infra) end - Helpers.ensure_dir_exists(dest_cloud_init) + AppInit.ensure_dir_exists(dest_cloud_init) Logging.debug("Copying recursively '%s' to '%s'" % [cloud_init, infra]) FileUtils.copy_entry(cloud_init, dest_cloud_init) - build_env = File.join(template,'maestro.box.master.env') + template_file = 'maestro.box.' + branch + '.env' + build_env = File.join(template,template_file) Logging.debug("Copying '%s' to '%s'" % [build_env, infra]) FileUtils.copy(build_env, infra) file_ver = File.join(infra, 'forj-cli.ver') File.write(file_ver, $INFRA_VERSION) @@ -126,10 +127,10 @@ # SET_DOMAIN="{SET_DOMAIN!}" => Setting for Maestro (required) and DNS if enabled. # ==> :forj_accounts, sAccountName, :dns, :domain_name sAccountName = oConfig.get(:account_name) yDns = {} - yDns = oConfig.ExtraGet(:forj_accounts, sAccountName, :dns) if oConfig.ExtraExist?(:forj_accounts, sAccountName, :dns) + yDns = oConfig.oConfig.ExtraGet(:forj_accounts, sAccountName, :dns) if oConfig.oConfig.ExtraExist?(:forj_accounts, sAccountName, :dns) build_env = File.join(infra_dir, 'maestro.box.master.env') Logging.debug("Reading data from '%s'" % build_env) tags = {'SET_DNS_TENANTID' => :tenant_id, 'SET_DNS_ZONE' => :service, 'SET_DOMAIN' => :domain_name