def get_build_configs(factory, configfile): executor = factory.executor workspace = factory.workspace inputpath = workspace._resolve_build_input_file(configfile, '.txt') configs = _read_matrix_configs(executor, inputpath) configs = select_build_hosts(factory, configs) return configs
def _get_build_configs(factory, configfile): executor = factory.executor workspace = factory.workspace inputpath = workspace._resolve_build_input_file(configfile, '.txt') configs = _read_matrix_configs(executor, inputpath) configs = select_build_hosts(factory, configs) _check_matrix_configs(configs) return configs
def _read_build_script_config(factory, script_name): projects = factory.projects workspace = factory.workspace workspace._clear_workspace_dirs() projects.checkout_project(factory.default_project) build_script_path = workspace._resolve_build_input_file(script_name, '.py') script = BuildScript(factory.executor, build_script_path) config = BuildConfig(script.settings.build_opts) config = select_build_hosts(factory, [config])[0] return config.to_dict()
def _read_build_script_config(factory, script_name): projects = factory.projects workspace = factory.workspace workspace._clear_workspace_dirs() projects.checkout_project(factory.default_project) build_script_path = workspace._resolve_build_input_file( script_name, '.py') script = BuildScript(factory.executor, build_script_path) config = BuildConfig(script.settings.build_opts) config = select_build_hosts(factory, [config])[0] return config.to_dict()
def _read_build_script_config(factory, script_name, outputfile): workspace = factory.workspace workspace._clear_workspace_dirs() workspace._checkout_project(factory.default_project) build_script_path = workspace._resolve_build_input_file(script_name, '.py') script = BuildScript(factory.executor, build_script_path) config = BuildConfig(script.build_opts) config = select_build_hosts(factory, [config])[0] workspace._init_build_dir(out_of_source=True) outputpath = os.path.join(workspace.build_dir, outputfile) contents = json.dumps(config.to_dict()) factory.executor.write_file(outputpath, contents)