Skip to content
This repository has been archived by the owner on Apr 20, 2023. It is now read-only.

Added ability to specify the number of upload attempts via command line. #276

Merged
merged 6 commits into from Jun 22, 2020
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
9 changes: 9 additions & 0 deletions codecov/__init__.py
Expand Up @@ -407,6 +407,12 @@ def main(*argv, **kwargs):
help="Specify a custom pr number, provided automatically for supported CI companies",
)
advanced.add_argument("--tag", default=None, help="Git tag")
advanced.add_argument(
"--tries",
default=3,
type=int,
help="Specify the number of attempts to make when uploading coverage report",
thomasrockhu marked this conversation as resolved.
Show resolved Hide resolved
)

enterprise = parser.add_argument_group(
"======================== Enterprise ========================"
Expand Down Expand Up @@ -1108,6 +1114,7 @@ def main(*argv, **kwargs):
res = retry_upload(
"%s/upload/v4?%s" % (codecov.url, urlargs),
requests.post,
codecov.tries,
thomasrockhu marked this conversation as resolved.
Show resolved Hide resolved
break_codes=(200, 400, 406),
verify=codecov.cacert,
headers={
Expand All @@ -1128,6 +1135,7 @@ def main(*argv, **kwargs):
s3 = retry_upload(
upload_url,
requests.put,
codecov.tries,
thomasrockhu marked this conversation as resolved.
Show resolved Hide resolved
verify=codecov.cacert,
data=reports_gzip,
headers={
Expand All @@ -1149,6 +1157,7 @@ def main(*argv, **kwargs):
res = retry_upload(
"%s/upload/v2?%s" % (codecov.url, urlargs),
requests.post,
codecov.tries,
thomasrockhu marked this conversation as resolved.
Show resolved Hide resolved
verify=codecov.cacert,
data=reports_gzip,
headers={
Expand Down