codecov / codecov-exe

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

TeamCity build - Failed to upload the report #74

Closed brondavies closed 5 years ago

brondavies commented 5 years ago

The command I am using is codecov -f "C:\TeamCity\buildAgent\work\de2c4e6ef697cb99\test_coverage.xml" -t %CodeCovToken%

[11:14:46]  2019-07-05 16:14:46 INF TeamCity detected.
[11:14:46]  2019-07-05 16:14:46 INF Git detected.
[11:14:46]  2019-07-05 16:14:46 INF Project root: C:\TeamCity\buildAgent\work\de2c4e6ef697cb99
[11:14:47]  2019-07-05 16:14:47 INF Yaml not found, that's ok! Learn more at http://docs.codecov.io/docs/codecov-yaml
[11:14:47]  2019-07-05 16:14:47 INF Reading reports.
[11:14:48]  2019-07-05 16:14:48 INF C:\TeamCity\buildAgent\work\de2c4e6ef697cb99\test_coverage.xml
[11:14:48]  2019-07-05 16:14:48 INF Uploading Reports.
[11:14:48]  2019-07-05 16:14:48 INF url: https://codecov.io
[11:14:49]  2019-07-05 16:14:49 INF query: https://codecov.io/upload/v4?branch=refs/pull/577/merge&commit=f9e4ee732960f6c3786c1a2645de6f09596748b8&build=7173&tag=&pr=&name=&flags=&slug=my%2Frepo&package=exe-1.5.0&build_url=https%3A%2F%2Fmyserver.com%2FviewLog.html%3FbuildId%3D7173&yaml=&job=&service=teamcity
[11:14:49]  2019-07-05 16:14:49 INF Pinging Codecov
[11:15:05]  2019-07-05 16:15:05 FTL Failed to upload the report.
[11:15:05]     at Codecov.Upload.Uploads.Uploader() in C:\projects\codecov-exe\Source\Codecov\Upload\Uploads.cs:line 35
[11:15:05]     at Codecov.Program.UploadFacade.Uploader() in C:\projects\codecov-exe\Source\Codecov\Program\UploadFacade.cs:line 121
[11:15:05]     at Codecov.Program.Run.Uploader() in C:\projects\codecov-exe\Source\Codecov\Program\Run.cs:line 51
[11:15:05]     at Codecov.Program.Run.Runner(IEnumerable`1 args) in C:\projects\codecov-exe\Source\Codecov\Program\Run.cs:line 19
[11:15:06]  Process exited with code 0
AdmiringWorm commented 5 years ago

Hav you set up TeamCity with the information described in the README.md? https://github.com/codecov/codecov-exe#teamcity

From the url that codecov-exe tries to ping, at least the branch name is invalid and may be the cause of the failure.

brondavies commented 5 years ago

I have set up the environment variables as outlined. I will look into what might be wrong with the branch name but I know it's able to upload from my development machine.

brondavies commented 5 years ago

I had not uploaded the base branch coverage report - after doing that it was able to upload per branch/PR reports.