예제 #1
0
def do_push(success_builds):
    @log_params_return('debug')
    def f(build):
        repo_dir = build['path']
        push(repo_dir)
        head_tag = get_tag(repo_dir)
        if head_tag:
            push(repo_dir, ref=head_tag)
        return dict(build, commit=get_commit(repo_dir), tag=head_tag)

    return pmap(f, success_builds)
예제 #2
0
def analyze_all(analyze_single, success_builds):
    return pmap(analyze_single, success_builds, processes=4)
예제 #3
0
def test_pmap():
    assert [2, 4, 6] == pmap(lambda x: x * 2, [1, 2, 3])
예제 #4
0
def sync_repos(repos, repo_paths, work_dir, branches, setup_branch):
    return pmap(partial(sync_repo, work_dir, branches, setup_branch),
                zip(repos, repo_paths))
예제 #5
0
def set_status(build_state, build_url):
    return pmap(partial(set_single_status, build_url), build_state)