This commit is contained in:
alesapin 2021-09-15 12:19:08 +03:00
parent 9d9ffb9738
commit 32f28fb8b6

View File

@ -105,22 +105,24 @@ if __name__ == "__main__":
gh = Github(os.getenv("GITHUB_TOKEN")) gh = Github(os.getenv("GITHUB_TOKEN"))
check = get_check(gh, commit_sha) check = get_check(gh, commit_sha)
print("EDIT CHECK NAME")
check.edit(name="Test style check") check.edit(name="Test style check")
docker_image_version = os.getenv("DOCKER_IMAGE_VERSION", "latest") #docker_image_version = os.getenv("DOCKER_IMAGE_VERSION", "latest")
if not aws_secret_key_id or not aws_secret_key: #if not aws_secret_key_id or not aws_secret_key:
logging.info("No secrets, will not upload anything to S3") # logging.info("No secrets, will not upload anything to S3")
s3_helper = S3Helper('https://storage.yandexcloud.net', aws_access_key_id=aws_secret_key_id, aws_secret_access_key=aws_secret_key) #s3_helper = S3Helper('https://storage.yandexcloud.net', aws_access_key_id=aws_secret_key_id, aws_secret_access_key=aws_secret_key)
if os.path.exists(temp_path): #if os.path.exists(temp_path):
shutil.rmtree(temp_path) # shutil.rmtree(temp_path)
if not os.path.exists(temp_path): #if not os.path.exists(temp_path):
os.makedirs(temp_path) # os.makedirs(temp_path)
subprocess.check_output(f"docker run --cap-add=SYS_PTRACE --volume={repo_path}:/ClickHouse --volume={temp_path}:/test_output clickhouse/style-test:{docker_image_version}", shell=True) #subprocess.check_output(f"docker run --cap-add=SYS_PTRACE --volume={repo_path}:/ClickHouse --volume={temp_path}:/test_output clickhouse/style-test:{docker_image_version}", shell=True)
state, description, test_results, additional_files = process_result(temp_path) #state, description, test_results, additional_files = process_result(temp_path)
report_url = upload_results(s3_helper, get_pr_url_from_ref(ref), commit_sha, state, description, test_results, additional_files) #report_url = upload_results(s3_helper, get_pr_url_from_ref(ref), commit_sha, state, description, test_results, additional_files)
check.edit(details_url=report_url) print("EDIT CHECK URL")
check.edit(details_url="https://storage.yandexcloud.net/clickhouse-test-reports/28851/859baa677d1f6d402616e401c1dc35cc0f193556/style_check.html")