def integration_main(args): conf = get_test_config(args) app = libgiza.app.BuildApp.new(pool_type=conf.runstate.runner, pool_size=conf.runstate.pool_size, force=conf.runstate.force) build_path = os.path.join(conf.paths.projectroot, conf.paths.output) giza.tools.files.safe_create_directory(build_path) for project in conf.test.projects: if (args._test_op not in project.operations and args._test_op.lower()[5:] not in project.operations): m = 'operation {0} not defined for project {1}' logger.error(m.format(args._test_op, project)) continue if (args._override_projects is not None and project.project not in args._override_projects): continue if args._override_branch is not None: project.branches = args._override_branch if project.root is None: path = os.path.join(build_path, project.project) git_path = path else: path = os.path.join(build_path, project.project, project.root) git_path = os.path.join(build_path, project.project) task = app.add( libgiza.task.Task(job=setup_test_repo, args=(git_path, project), ignore=False)) if args._test_op.startswith('clean'): task = task.add_finalizer( libgiza.task.Task(job=cleaner, args=[path], ignore=False)) for branch in project.branches: task = task.add_finalizer( libgiza.task.Task(job=change_branch, args=(path, branch), ignore=False)) if args._test_op.startswith('clean'): op_name = args._test_op.lower()[5:] else: op_name = args._test_op for op in project.operations[op_name]: task = task.add_finalizer( libgiza.task.Task(job=run_test_op, args=(op, path), ignore=False)) app.run()
def integration_main(args): conf = get_test_config(args) app = libgiza.app.BuildApp.new( pool_type=conf.runstate.runner, pool_size=conf.runstate.pool_size, force=conf.runstate.force ) build_path = os.path.join(conf.paths.projectroot, conf.paths.output) giza.tools.files.safe_create_directory(build_path) for project in conf.test.projects: if args._test_op not in project.operations and args._test_op.lower()[5:] not in project.operations: m = "operation {0} not defined for project {1}" logger.error(m.format(args._test_op, project)) continue if args._override_projects is not None and project.project not in args._override_projects: continue if args._override_branch is not None: project.branches = args._override_branch if project.root is None: path = os.path.join(build_path, project.project) git_path = path else: path = os.path.join(build_path, project.project, project.root) git_path = os.path.join(build_path, project.project) task = app.add(libgiza.task.Task(job=setup_test_repo, args=(git_path, project), ignore=False)) if args._test_op.startswith("clean"): task = task.add_finalizer(libgiza.task.Task(job=cleaner, args=[path], ignore=False)) for branch in project.branches: task = task.add_finalizer(libgiza.task.Task(job=change_branch, args=(path, branch), ignore=False)) if args._test_op.startswith("clean"): op_name = args._test_op.lower()[5:] else: op_name = args._test_op for op in project.operations[op_name]: task = task.add_finalizer(libgiza.task.Task(job=run_test_op, args=(op, path), ignore=False)) app.run()
def deploy(args): conf = fetch_config(args) conf.runstate.package_path = fetch_package(conf.runstate.package_path, conf) logger.info('extracting package: ' + conf.runstate.package_path) extract_package(conf) logger.info('extracted package') app = libgiza.app.BuildApp.new(pool_type=conf.runstate.runner, pool_size=conf.runstate.pool_size, force=conf.runstate.force) logger.info('beginning deploy now.') deploy_tasks(conf, app) if conf.runstate.dry_run is False: app.run()