Exemplo n.º 1
0
def upload_ccache(path_to_ccache_dir, s3_helper, current_pr_number, temp_path):
    logging.info("Uploading cache %s for pr %s", path_to_ccache_dir, current_pr_number)
    ccache_name = os.path.basename(path_to_ccache_dir)
    compressed_cache_path = os.path.join(temp_path, ccache_name + ".tar.gz")
    compress_fast(path_to_ccache_dir, compressed_cache_path)

    s3_path = str(current_pr_number) + "/ccaches/" + os.path.basename(compressed_cache_path)
    logging.info("Will upload %s to path %s", compressed_cache_path, s3_path)
    s3_helper.upload_build_file_to_s3(compressed_cache_path, s3_path)
    logging.info("Upload finished")
Exemplo n.º 2
0
                logging.info("Run successfully")
            else:
                logging.info("Run failed")

    status = "success"
    description = "No invalid analysis found ヽ(‘ー`)ノ"
    jepsen_log_path = os.path.join(result_path, "jepsen_run_all_tests.log")
    additional_data = []
    try:
        test_result = _parse_jepsen_output(jepsen_log_path)
        if any(r[1] == "FAIL" for r in test_result):
            status = "failure"
            description = "Found invalid analysis (ノಥ益ಥ)ノ ┻━┻"

        compress_fast(
            os.path.join(result_path, "store"),
            os.path.join(result_path, "jepsen_store.tar.gz"),
        )
        additional_data.append(os.path.join(result_path,
                                            "jepsen_store.tar.gz"))
    except Exception as ex:
        print("Exception", ex)
        status = "failure"
        description = "No Jepsen output log"
        test_result = [("No Jepsen output log", "FAIL")]

    s3_helper = S3Helper("https://s3.amazonaws.com")
    report_url = upload_results(
        s3_helper,
        pr_info.number,
        pr_info.sha,
        test_result,
Exemplo n.º 3
0
            if retcode == 0:
                logging.info("Run successfully")
            else:
                logging.info("Run failed")

    status = 'success'
    description = 'No invalid analysis found ヽ(‘ー`)ノ'
    jepsen_log_path = os.path.join(result_path, 'jepsen_run_all_tests.log')
    additional_data = []
    try:
        test_result = _parse_jepsen_output(jepsen_log_path)
        if any(r[1] == 'FAIL' for r in test_result):
            status = 'failure'
            description = 'Found invalid analysis (ノಥ益ಥ)ノ ┻━┻'

        compress_fast(os.path.join(result_path, 'store'),
                      os.path.join(result_path, 'jepsen_store.tar.gz'))
        additional_data.append(os.path.join(result_path,
                                            'jepsen_store.tar.gz'))
    except Exception as ex:
        print("Exception", ex)
        status = 'failure'
        description = 'No Jepsen output log'
        test_result = [('No Jepsen output log', 'FAIL')]

    s3_helper = S3Helper('https://s3.amazonaws.com')
    report_url = upload_results(s3_helper, pr_info.number, pr_info.sha,
                                test_result, [run_log_path] + additional_data,
                                CHECK_NAME)

    print(f"::notice ::Report url: {report_url}")
    post_commit_status(gh, pr_info.sha, CHECK_NAME, description, status,