This commit is contained in:
alesapin 2021-11-08 19:25:00 +03:00
parent f90bbf902f
commit 364968b3cf
2 changed files with 7 additions and 1 deletions

View File

@ -50,7 +50,7 @@ def get_commit(gh, commit_sha):
return commit return commit
def upload_results(s3_client, pr_number, commit_sha, test_results, additional_files): def upload_results(s3_client, pr_number, commit_sha, test_results, additional_files):
s3_path_prefix = str(pr_number) + "/" + commit_sha + "/" + NAME.lower().replace(' ', '_') s3_path_prefix = str(pr_number) + "/" + commit_sha + "/" + NAME.lower().replace(' ', '_').replace('(', '_').replace(')', '_')
additional_urls = process_logs(s3_client, additional_files, s3_path_prefix) additional_urls = process_logs(s3_client, additional_files, s3_path_prefix)
branch_url = "https://github.com/ClickHouse/ClickHouse/commits/master" branch_url = "https://github.com/ClickHouse/ClickHouse/commits/master"

View File

@ -40,6 +40,12 @@ class S3Helper():
elif s3_path.endswith("html"): elif s3_path.endswith("html"):
metadata['ContentType'] = "text/html; charset=utf-8" metadata['ContentType'] = "text/html; charset=utf-8"
logging.info("Content type %s for file path %s", "text/html; charset=utf-8", file_path) logging.info("Content type %s for file path %s", "text/html; charset=utf-8", file_path)
elif s3_path.endswith("css"):
metadata['ContentType'] = "text/css; charset=utf-8"
logging.info("Content type %s for file path %s", "text/css; charset=utf-8", file_path)
elif s3_path.endswith("js"):
metadata['ContentType'] = "text/javascript; charset=utf-8"
logging.info("Content type %s for file path %s", "text/css; charset=utf-8", file_path)
else: else:
logging.info("No content type provied for %s", file_path) logging.info("No content type provied for %s", file_path)
else: else: