Skip to content
This repository was archived by the owner on May 21, 2025. It is now read-only.
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions codecov/__init__.py
Original file line number Diff line number Diff line change
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 total number of attempts to make when uploading coverage report",
)

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,
retries=codecov.tries,
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,
retries=codecov.tries,
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,
retries=codecov.tries,
verify=codecov.cacert,
data=reports_gzip,
headers={
Expand Down