title: How can I set up code coverage threshold as a high water mark in TeamCity?
body: <p>I have a TeamCity build that captures code coverage for unit tests.  I have also defined an environment variable for the minimum code coverage for the build to succeed, which works fine but I don't like to maintain this threshold manually.  The question I have is whether there is a way (outside of publishing code coverage statistics somewhere outside of TeamCity and then reading the results from the last successful build) to automatically adjust the threshold as code coverage improves to ensure that it's a steady improvement without allowing backsliding :)?  </p>
  
  <p>For example, suppose the current code coverage is 20% (a legacy application) and as new unit tests are written, code coverage improves to 25%.  Then, someone checks in new code without unit tests and code coverage drops to 24%. I would want TeamCity to fail the build because code coverage dropped from 25% to 24%.</p>