From 5f89dc566d26b8e25ca27fbe265e158ce664684a Mon Sep 17 00:00:00 2001 From: Tony Le Date: Thu, 7 Nov 2024 14:18:30 -0500 Subject: [PATCH] upload-process uses combined-upload --- codecov_cli/commands/upload_process.py | 128 +++++++++++++++---------- 1 file changed, 78 insertions(+), 50 deletions(-) diff --git a/codecov_cli/commands/upload_process.py b/codecov_cli/commands/upload_process.py index 1ee77eca..d4af415e 100644 --- a/codecov_cli/commands/upload_process.py +++ b/codecov_cli/commands/upload_process.py @@ -4,8 +4,8 @@ import click +from codecov_cli.commands.combined_upload import combined_upload from codecov_cli.commands.commit import create_commit -from codecov_cli.commands.report import create_report from codecov_cli.commands.upload import do_upload, global_upload_options from codecov_cli.helpers.args import get_cli_args from codecov_cli.helpers.options import global_options @@ -67,59 +67,87 @@ def upload_process( ), ) - ctx.invoke( - create_commit, - commit_sha=commit_sha, - parent_sha=parent_sha, - pull_request_number=pull_request_number, - branch=branch, - slug=slug, - token=token, - git_service=git_service, - fail_on_error=True, - ) if report_type == "coverage": ctx.invoke( - create_report, + combined_upload, + branch=branch, + build_code=build_code, + build_url=build_url, + commit_sha=commit_sha, + disable_file_fixes=disable_file_fixes, + disable_search=disable_search, + dry_run=dry_run, + env_vars=env_vars, + fail_on_error=fail_on_error, + files_search_exclude_folders=files_search_exclude_folders, + files_search_explicitly_listed_files=files_search_explicitly_listed_files, + files_search_root_folder=files_search_root_folder, + flags=flags, + gcov_args=gcov_args, + gcov_executable=gcov_executable, + gcov_ignore=gcov_ignore, + gcov_include=gcov_include, + git_service=git_service, + handle_no_reports_found=handle_no_reports_found, + job_code=job_code, + name=name, + network_filter=network_filter, + network_prefix=network_prefix, + network_root_folder=network_root_folder, + parent_sha=parent_sha, + plugin_names=plugin_names, + pull_request_number=pull_request_number, + report_code=report_code, + report_type=report_type, + slug=slug, + swift_project=swift_project, token=token, - code=report_code, - fail_on_error=True, + use_legacy_uploader=use_legacy_uploader, + ) + else: + ctx.invoke( + create_commit, commit_sha=commit_sha, + parent_sha=parent_sha, + pull_request_number=pull_request_number, + branch=branch, slug=slug, + token=token, git_service=git_service, + fail_on_error=True, + ) + ctx.invoke( + do_upload, + branch=branch, + build_code=build_code, + build_url=build_url, + commit_sha=commit_sha, + disable_file_fixes=disable_file_fixes, + disable_search=disable_search, + dry_run=dry_run, + env_vars=env_vars, + fail_on_error=fail_on_error, + files_search_exclude_folders=files_search_exclude_folders, + files_search_explicitly_listed_files=files_search_explicitly_listed_files, + files_search_root_folder=files_search_root_folder, + flags=flags, + gcov_args=gcov_args, + gcov_executable=gcov_executable, + gcov_ignore=gcov_ignore, + gcov_include=gcov_include, + git_service=git_service, + handle_no_reports_found=handle_no_reports_found, + job_code=job_code, + name=name, + network_filter=network_filter, + network_prefix=network_prefix, + network_root_folder=network_root_folder, + plugin_names=plugin_names, + pull_request_number=pull_request_number, + report_code=report_code, + report_type=report_type, + slug=slug, + swift_project=swift_project, + token=token, + use_legacy_uploader=use_legacy_uploader, ) - ctx.invoke( - do_upload, - branch=branch, - build_code=build_code, - build_url=build_url, - commit_sha=commit_sha, - disable_file_fixes=disable_file_fixes, - disable_search=disable_search, - dry_run=dry_run, - env_vars=env_vars, - fail_on_error=fail_on_error, - files_search_exclude_folders=files_search_exclude_folders, - files_search_explicitly_listed_files=files_search_explicitly_listed_files, - files_search_root_folder=files_search_root_folder, - flags=flags, - gcov_args=gcov_args, - gcov_executable=gcov_executable, - gcov_ignore=gcov_ignore, - gcov_include=gcov_include, - git_service=git_service, - handle_no_reports_found=handle_no_reports_found, - job_code=job_code, - name=name, - network_filter=network_filter, - network_prefix=network_prefix, - network_root_folder=network_root_folder, - plugin_names=plugin_names, - pull_request_number=pull_request_number, - report_code=report_code, - report_type=report_type, - slug=slug, - swift_project=swift_project, - token=token, - use_legacy_uploader=use_legacy_uploader, - )