Open zone117x opened 6 years ago
You read my mind. TeamCity was going to be next, I just started refactoring to support Travis as well.
I also want to add the ability to it to write out teamcity coverage stats as well
It seems sensible to use the same names as codcov, as people may already have them set up. It might also be possible to call the api and pull the parameters automagically, I will have to see.
In the meantime it works with command line arguments so you can still make it work. Look at one of the existing Travis examples in csMACnz/Coveralls.net-Samples branches.
As far as i can see, env.BUILD_VCS_NUMBER
is standard for commit, and env.TEAMCITY_VERSION
is a standard way to detect on teamcity. Othrwise there is not enough data already in there to make it magically work. The server url is a parameter, so would need to be exposed, that work is better spent adding env-vars. Also if anyone is running this inside docker, env vars are easier to setup and pass through.
Copy codecov it is.
I actually ran into annoyances getting some of those server env parameters into the build script and did not get that codecov message to go away. Despite that message still appearing, the codecov bash script is able to gather everything it needs for a full report with git info. Its not completely clear to me how it's doing that.
pushed a first draft to develop, will get some testing done and should make it in the next next release (probably 1.1.0
, 1.0.0
is gonna be hopefully just the stable 2.1 tools support release)
It looks like apart from the complexity of pull requests, using env.BUILD_VCS_NUMBER
and pushing to the alternative commit_sha
value rather than pushing all the git
data, it should get to a mostly just works for master, customise for PRs state. But as i say, needs testing.
Awesome! Thanks for doing this so fast. Can you push a nuget prerelease package? Currently using v1.0.0-beta0003 with the dotnet 2.1 RC1 build tools.
From memory appveyor has a nuget feed of the artifacts, in the meantime you might find it there. If I get develop stable enough there is a change it will merge into the next pre release of 1.0.0, otherwise.
Looks liked the dev appveyor build failed to find a nupkg file
I compiled the latest source and tried using the new version of the tool. Stilling getting a "no git data" message. I'm not sure if the teamcity adapter is not implemented correctly, or if my server is still using the previous version. Please update this issue once the nuget package is pushed so I can test!
sorry, forgot to wire in the new classes, I've added tests and chased out a few bugs in my logic as well. You could try again if you have the time or inclination.
I'd love to test, could you fix the appveyor nupkg building? https://ci.appveyor.com/project/MarkClearwater/coveralls-net/build/1.1.0-unstable.6.build.1322/job/ebcn8bqjg4fidp5j#L1605 I can pull the package from appveyor.
So sorry about that I lost a local commit along the way between my two dev machines. all sorted now 🤦♂️
I've gotten access to teamcity.jetbrains.com opensource build service to build and test out this functionality proper.
The functionality from the Develop Branch is now heading towards a 2.0.0 release (there is a first alpha published. Certainly needs more attention and feedback from anyone who is actually using this on teamcity. there is a build running of itself on https://teamcity.jetbrains.com/ that does publish it's own coverage, but i probably need to make the usage instructions more visible somewhere. And a solution for loading all the git metadata (commit author, commit message) or guidance on if these are required could be useful. The solution to use the commit_sha only seems potentially better for some cases.
Would be nice to have a
class TeamCityGitDataResolver : IGitDataResolver
For example, when the Codecov.io bash script is ran in a teamcity build step, the following output is given:
Then after following the instructions, it proceeds to work as expected.
Could this project implement a similar way? Thoughts?
I may attempt to implement this if reasonable. Would appreciate any insight.