codecov / codecov-exe

.exe report uploader for Codecov https://codecov.io
MIT License
25 stars 21 forks source link

Failed to upload the report #40

Closed janssenr closed 5 years ago

janssenr commented 6 years ago

2018-08-12 00:09:00 WRN No CI detected. 2018-08-12 00:09:01 WRN No VCS detected. 2018-08-12 00:09:01 INF Project root: D:\GitHub\RaboOmniKassaApi.Net\trunk\src 2018-08-12 00:09:01 INF Yaml not found, that's ok! Learn more at http://docs.codecov.io/docs/codecov-yaml 2018-08-12 00:09:01 INF Reading reports. 2018-08-12 00:09:01 INF coverage.xml 2018-08-12 00:09:01 INF Uploading Reports. 2018-08-12 00:09:03 INF url: https://codecov.io 2018-08-12 00:09:04 INF query: https://codecov.io/upload/v4?branch=&commit=&build=&tag=&pr=&name=&flags=&slug=&package=exe-1.0.5&build_url=&yaml=&job=&service= 2018-08-12 00:09:04 INF Pinging Codecov 2018-08-12 00:09:08 FTL Failed to upload the report. at Codecov.Upload.Uploads.Uploader() in D:\Docs\git\contributing\codecov-exe\Source\Codecov\Upload\Uploads.cs:line 34 at Codecov.Program.UploadFacade.Uploader() in D:\Docs\git\contributing\codecov-exe\Source\Codecov\Program\UploadFacade.cs:line 119 at Codecov.Program.Run.Runner(IEnumerable`1 args) in D:\Docs\git\contributing\codecov-exe\Source\Codecov\Program\Run.cs:line 20

AdmiringWorm commented 6 years ago

From your log, I need to make sure of a few things.

Since it seems like you're running it from a local repository, and not from appveyor, you need to specify the api token when pushing reports.

It also seems like codecov isn't able to detect that you're running it from a repository. This could be caused by several things:

  1. You're not running it from a repository (of course), or it may not have a commit available.
  2. You're not running it from the root of the repository
janssenr commented 6 years ago

I downloaded the package from NuGet, and I'am running it from the commandline. .\packages\Codecov.1.0.5\tools\codecov -f "coverage.xml" -t ""

So i do specify the api token! But why is it still failing?

AdmiringWorm commented 6 years ago

As I mentioned, codecov isn't able to detect that you're running it from within a repository, which may be caused by the one of the following:

  1. You're not running it from a repository (of course), or it may not have a commit available.
  2. You're not running it from the root of the repository

Unless you specify everything yourself that codecov needs, then it needs to detect the repository the coverage report is for.

AdmiringWorm commented 6 years ago

I forgot to mention, you can also use the --root argument when calling codecov, just make sure that the path following the argument is the path to the directory were `.git/.hg? is located.

for instance: codecov --root D:\GitHub\RaboOmniKassaApi.Net --token "API-Token-Here"

janssenr commented 6 years ago

I use TortoiseSVN. SO I don't have a .git/.hg file. Is that causing the problem?

AdmiringWorm commented 6 years ago

That would indeed be the cause, only git (and I think mercurial) is supported right now.

When you use something else, you'll need to specify the metadata yourself.

I'm not 100% on which are needed, but at least the commit sha is needed which you can specify with the --sha argument.

I'm not familiar with TortoiseSVN, or SVN in general so I'm not sure what's available there.

I've added a wiki page on what arguments is available in the latest version of codecov: https://github.com/codecov/codecov-exe/wiki/Available-Arguments

try specifying as much as possible through those arguments, you can also set them through environment variables if that is easier, supported environment varialbes is:

VCS_BRANCH_NAME
VCS_COMMIT_ID
VCS_PULL_REQUEST
VCS_SLUG
VCS_TAG
AdmiringWorm commented 5 years ago

@janssenr since there hasn't been any additional response, I'll be closing this issue.

If you wish to request that SVN support being added to codecov exe, please open a new issue for that.

janssenr commented 5 years ago

I specified the commit sha and now it’s working!

Van: Kim J. Nordmo [mailto:notifications@github.com] Verzonden: donderdag 23 augustus 2018 15:54 Aan: codecov/codecov-exe codecov-exe@noreply.github.com CC: Rob Janssen rob.janssen@upcmail.nl; Author author@noreply.github.com Onderwerp: Re: [codecov/codecov-exe] Failed to upload the report (#40)

That would indeed be the cause, only git (and I think mercurial) is supported right now.

When you use something else, you'll need to specify the metadata yourself.

I'm not 100% on which are needed, but at least the commit sha is needed which you can specify with the --sha argument.

I'm not familiar with TortoiseSVN, or SVN in general so I'm not sure what's available there.

I've added a wiki page on what arguments is available in the latest version of codecov: https://github.com/codecov/codecov-exe/wiki/Available-Arguments

try specifying as much as possible through those arguments, you can also set them through environment variables if that is easier, supported environment varialbes is:

VCS_BRANCH_NAME VCS_COMMIT_ID VCS_PULL_REQUEST VCS_SLUG VCS_TAG

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/codecov/codecov-exe/issues/40#issuecomment-415421890 , or mute the thread https://github.com/notifications/unsubscribe-auth/AG7w2YDvl86dhFSMgHFdVLh_LT8yjQ6Pks5uTrPhgaJpZM4V5U4I . https://github.com/notifications/beacon/AG7w2fHGwHJFrD2gCyVLdtiNXBaZxSzvks5uTrPhgaJpZM4V5U4I.gif

AdmiringWorm commented 5 years ago

I'm glad that you made it work, as I said though. If you wish for offical SVN support being added to the codecov utility, please feel free to open a issue specifically for it.