Ejemplo n.º 1
0
def run_bot(patches, working_dir, commit, bot, query):
    results = []

    for series in list.search_subseries(patches, query):
        if not is_pull_request(series) and 'mbox_path' not in series:
            continue

        result = series
        s, steps = try_to_build(series, working_dir, commit, bot)
        result['buildbot'] = {'status': s, 'steps': steps}
        results.append(result)

    results = {
        'patches': results,
        'version': data.VERSION,
        'owner': config.get_buildbot_owner(bot)
    }

    try_rmtree(working_dir)
    util.replace_file(
        config.get_buildbot_json(bot),
        json.dumps(results,
                   indent=2,
                   separators=(',', ': '),
                   encoding='iso-8859-1'))
Ejemplo n.º 2
0
def run_bot(patches, working_dir, commit, bot, query):
    results = []

    for series in list.search_subseries(patches, query):
        if not is_pull_request(series) and 'mbox_path' not in series:
            continue

        result = series
        s, steps = try_to_build(series, working_dir, commit, bot)
        result['buildbot'] = { 'status': s, 'steps': steps }
        results.append(result)

    results = { 'patches': results,
                'version': data.VERSION,
                'owner': config.get_buildbot_owner(bot) }

    try_rmtree(working_dir)
    util.replace_file(config.get_buildbot_json(bot),
                      json.dumps(results, indent=2,
                                 separators=(',', ': '),
                                 encoding='iso-8859-1'))
Ejemplo n.º 3
0
def notify(args, patches, notified_dir, query, template):
    sender = config.get_default_sender()
    for series in search_subseries(patches, query):
        sd = SeriesDict(series)
        try_to_send(args, notified_dir, sender, series['messages'][0], template % sd)
Ejemplo n.º 4
0
def notify(args, patches, notified_dir, query, template):
    sender = config.get_default_sender()
    for series in search_subseries(patches, query):
        sd = SeriesDict(series)
        try_to_send(args, notified_dir, sender, series['messages'][0],
                    template % sd)