|
14 | 14 | from git_helper import Git
|
15 | 15 | from pr_info import PRInfo, EventType
|
16 | 16 | from report import FAILURE, SUCCESS, JobReport, StatusType
|
| 17 | +from s3_helper import S3Helper |
17 | 18 | from stopwatch import Stopwatch
|
18 | 19 | from tee_popen import TeePopen
|
19 | 20 | from version_helper import (
|
@@ -223,6 +224,28 @@ def main():
|
223 | 224 | f"sudo chown -R ubuntu:ubuntu {build_output_path}", shell=True
|
224 | 225 | )
|
225 | 226 | logging.info("Build finished as %s, log path %s", build_status, log_path)
|
| 227 | + |
| 228 | + s3_helper = S3Helper() |
| 229 | + s3_path_prefix = "/".join( |
| 230 | + ( |
| 231 | + get_release_or_pr(pr_info, get_version_from_repo())[0], |
| 232 | + pr_info.sha, |
| 233 | + build_name, |
| 234 | + ) |
| 235 | + ) |
| 236 | + src_path = temp_path / "build_source.src.tar.gz" |
| 237 | + s3_path = s3_path_prefix + "/clickhouse-" + version.string + ".src.tar.gz" |
| 238 | + logging.info("s3_path %s", s3_path) |
| 239 | + if src_path.exists(): |
| 240 | + src_url = s3_helper.upload_build_file_to_s3( |
| 241 | + src_path, s3_path |
| 242 | + ) |
| 243 | + logging.info("Source tar %s", src_url) |
| 244 | + print(f"::notice ::Source tar URL: {src_url}") |
| 245 | + else: |
| 246 | + logging.info("Source tar doesn't exist") |
| 247 | + print("Source tar doesn't exist") |
| 248 | + |
226 | 249 | if build_status != SUCCESS:
|
227 | 250 | # We check if docker works, because if it's down, it's infrastructure
|
228 | 251 | try:
|
|
0 commit comments