Beispiel #1
0
def get_iso_info(jenkins_url, iso):
    main_job_name = "{0}.all".format(iso)
    test_all_job_name = "{0}.test_all".format(iso)

    main_job_builds = query_main_job(jenkins_url, main_job_name)
    test_results = get_test_all_results(jenkins_url, test_all_job_name)

    for number, values in main_job_builds.items():
        if util.has_key(test_results, number):
            to_copy = test_results[number]
            values["result"] = to_copy["result"]
            if util.has_key(to_copy, "downstream"):
                values["downstream"] = to_copy["downstream"]

    return main_job_builds
Beispiel #2
0
def should_insert_newer_build(builds, build, upstream_number):
    """Returns true if should update mapping from downstream
    build to matching upstream build.

    Each upstream build might have several downstream builds.
    We need to select only the latest one.
    """
    if util.has_key(builds, upstream_number):
        other = builds[upstream_number]
        if other["timestamp"] > build["timestamp"]:
            return False

    return True