Ejemplo n.º 1
0
def get_job_build_range(jenkins, job):
    url = JOB_INFO_URL.format(jenkins, job)
    resp = util.get_json(url)

    first = resp['firstBuild']['number']
    last = resp['lastFailedBuild']['number']

    return xrange(last, first, -1)
Ejemplo n.º 2
0
def get_job_build_range(jenkins, job):
    url = JOB_INFO_URL.format(jenkins, job)
    resp = util.get_json(url)

    first = resp['firstBuild']['number']
    last = resp['lastFailedBuild']['number']

    return xrange(last, first, -1)
Ejemplo n.º 3
0
def get_main_bug_task(bug_id):
    url = BUG_TASKS_URL.format(bug_id)
    resp = util.get_json(url)

    task = resp['entries'][0]
    task = util.select_keys(task, ['assignee_link', 'bug_target_name',
                                   'importance', 'status'])
    util.rename_key(task, 'bug_target_name', 'target')
    return task
Ejemplo n.º 4
0
def get_build(jenkins, job, number, short=True):
    if short:
        url_template = BUILD_SHORT_INFO_URL
    else:
        url_template = BUILD_INFO_URL

    url = url_template.format(jenkins, job, number)
    resp = util.get_json(url)
    return resp
Ejemplo n.º 5
0
def get_downstream_build_names(jenkins, job, ignore_list):
    url = JOB_INFO_URL.format(jenkins, job)
    resp = util.get_json(url)
    names = []

    for pair in resp["downstreamProjects"]:
        name = pair["name"]
        if name and name not in ignore_list:
            names.append(name)

    return names
Ejemplo n.º 6
0
def get_build(jenkins, job, number):
    url = BUILD_INFO_URL.format(jenkins, job, number)
    resp = util.get_json(url)
    return resp
Ejemplo n.º 7
0
def get_assignee(link):
    resp = util.get_json(link)
    return util.select_keys(resp, ['display_name', 'name', 'is_team'])
Ejemplo n.º 8
0
def get_bug_basic_info(link):
    resp = util.get_json(link)
    info = util.select_keys(resp, ['id', 'title', 'duplicate_of_link'])
    return info
Ejemplo n.º 9
0
def get_build(jenkins, job, number):
    url = BUILD_INFO_URL.format(jenkins, job, number)
    resp = util.get_json(url)
    return resp