nuGet packages published on the feed even even if tests fail
There does not appear to be a way of preventing the a nuGet build step from executing if unit tests fail. The result of this is I would have a faulty package published. Having a workaround by creating two build configurations with a dependancy appears to be the only solution.
Are you guys working on addressing this?
Note: this would be the result if any build step fails but does not terminate the build at that point.
Please sign in to leave a comment.
Hello,
There are several ways to implement it.
If you have result of your tests run, you may add packages (artifacts) with service message,
see http://confluence.jetbrains.net/display/TCD7/Build+Script+Interaction+with+TeamCity
Another approach is to implement the implement dependencies,
see http://blog.jonnyzzz.name/2011/09/selective-publishing-of-nuget-packages.html
Hi Eugene
I realize that this can be handled via dependancies or by writing a custom build task to push the artifacts. The point I am making is that it shouldn't be necessary, and these kinds of checks should be built into the product (or at least exposed as a configuration option) - a publish task that always executes regardless of the status of the build seems rather risky, don't you think?
Examples of how to correct this kind of behaviour are noted here (http://youtrack.jetbrains.com/issue/TW-13682) - when will we see some progress on it?
Regards
Adam
Adam,
I checked in the issue to steps execute even in previous step is failed.
Please try the next 7.1 EAP for it.
Adam, it seems you were aksing for inverse behaviour? You need to stop build if tests failed? Right?
Please create an issue for it in the issue tracker
Hi Eugene
The issue is here:
http://youtrack.jetbrains.com/issue/TW-17002
However, the issue you've mentioned describes a solution that gives us configurable control as to whether to run a step or not - based on a previous step output or build status. I guess the question is "how is this implemented"?
Regards
Adam
Right. Thanks!
There still seems to be no action on this - why would you ever want to publish a build that is failing tests as a NuGet package!
Hello,
Described problem does not depend on NuGet runner. The issue is NUnit runner does not fail a build as there are failed tests detected.
There are different use-cases of the tests runner. For some reason it could be necessary to let build coninue even if there are some failed
tests.
Please vote for http://youtrack.jetbrains.com/issue/TW-17002
So surely the solution is to have an option the NUnit step runner that says - "Fail the step/build if any test fails", then the new conditional step execution should take over since that should be obeying the build status.
A more comprehensive solution would be to have step dependencies aka build dependencies, but I imagine that would be a lot more work ;-)