Reputation: 2891
I use TeamCity 9.x and CAKE 0.22.0.
Currently, all my build steps are defined in TeamCity. Maintenance is becoming a nightmare, and so I would like to replace all these build steps (differently configured for most projects) with just one step that invokes build.cake
.
In build.cake
, I have a task called RunJetBrainsDotCover
, in which I invoke the method public static void DotCoverAnalyse(this ICakeContext context, Action action, FilePath outputFile, DotCoverAnalyseSettings settings). Currently, the argument outputFile
is dynamically supplied by TeamCity:
So my first question is: How can I dynamically supply the argument from TeamCity to the outputFile
parameter in my CAKE script?
After generating the XML report, TeamCity proceeds to perform a series of other actions -- packing snapshot files, removing other snapshot files (right now it is opaque to me how it is determined which snapshot files should be removed), printing build statistics, as well as publishing artifacts:
My second question is: How can I reproduce in build.cake
the exact same steps taken by TeamCity?
Looking into the Cake.Common.Tools.DotCover and Cake.Common.Build.TeamCity namespaces, it is not clear to me how I can do so. Any advice will be greatly appreciated.
Upvotes: 1
Views: 200
Reputation: 18981
The output file name that is generated by TeamCity is random, it isn't tied to anything that I am aware of. Is there any reason that you simply can't specify your own FilePath to the outputFile
parameter of the call to DotCoverAnalyse
? I don't see why they would need to be exactly the same file location.
In your second screen shot, it looks as though there is another methods, zip
and delete
within DotCover. There are not currently aliases in Cake for these methods. There is no reason that these couldn't exist, it is just that no-one has created them yet. Could be that this isn't a "required" step. What you need to do is to figure out whether for your build, you need these steps or not.
Upvotes: 2