teamcity

Running tests on feature branches

﹥>﹥吖頭↗ 提交于 2019-12-04 12:03:48
问题 I have a build configuration with a test VCS root that connects to git branch dev , 3 build steps and 1 trigger. These are my build steps: Build tests Run tests Build & Deploy I would like to run all of these build steps for branch dev but only two of them (build and run tests) for branches matching feature/* . I want this to be displayed under my build configuration. So the build configuration has a default dev branch that runs tests and deploys, but the feature/* additional branches only

Increment the build number automatically

Deadly 提交于 2019-12-04 11:37:26
I have two projects in solution. One is version 3.0.0.* and the other is 2.0.0.*. I build my solution on Team City using an MSBuild script. How can I inject the build number portion of the version string into the AssemblyVersion attribute leaving the major.minor.patch as defined at dev time. To put it another way I want to manually control major.minor.patch (and the majors will differ across libs in the solution) but auto increment the build number. TeamCity will automatically manage the AssemblyVersion attributes for you, but there are a few caveats: It will totally overwrite the existing

Access to TeamCity build comments

三世轮回 提交于 2019-12-04 11:31:26
A continuation on the answer to this question: Is it possible to add a free text note to a team city build? In TeamCity custom build dialog there is a field for "Build comments". Is there a way to access this from within the build? Either as a system property or environment variable? As far as I know, the Build Comments are not exposed or accessible from your build script, however you can create custom build parameters that are accessible. You can create system properties or environment variables, either of which can be accessed in your build script. See the TeamCity docs on custom parameters

How do I run MSpec test assemblies in parallel?

寵の児 提交于 2019-12-04 11:22:29
We have the following setup: Team City v8.1.2 .NET 2013 Solution with several different C# projects (ASP.NET MVC, libraries, testing projects, etc.) 95% of our tests are MSpec, but we also have some NUnit tests. We have 14 test projects and growing... Currently the testing phase is taking, roughly, 9 minutes for MSpec tests and 1 minute for NUnit. We would like to start parallelizing this, as we expect the number of tests to grow quickly. What would be the best solution, provided that: MSpec doesn't seem to have any parallel runner. The tests should be parallelized per assembly, which tests

Teamcity and Rake: Where are the tc system properties?

非 Y 不嫁゛ 提交于 2019-12-04 10:19:17
I'm converting some of my NAnt build scripts over to rake. Does anyone know how to access the system properties (e.g. build.number) inside my rake scripts? Is the Teamcity rake plugin even injecting them? I can't seem to find the doco. Please refer to the list of predefined properties . In the rake script and in the ruby code these variables are available via environment, for example add this in the rakefile : puts 'Build number: ' + ENV['BUILD_NUMBER'] If you want to see all the available properties, put the following code: ENV.each {|key, value| puts "#{key} = #{value}" } Run the build from

TeamCity deletes files on build

纵然是瞬间 提交于 2019-12-04 10:04:49
I am a newbie to TeamCity and Continuous Integration. I have followed this very nice guide to set everything up and it all seemed to work at first. TC could check out the files from SVN and it could build them with no problems. However I discovered that the 'Checkout directory'-setting was wrong, it pointed one folder above where it should be hence adding all new files from SVN in the wrong place but still building on the old ones. After correcting this the problems started. Now every time TC does a build it cleares all files in the 'Checkout directory' the problem with this is that not all

How to get git like statistics from TFS

这一生的挚爱 提交于 2019-12-04 09:10:52
问题 I've been working with TFS for a few months now and would like to get some basic statistics and make them available to our team. In git, i could retrieve statistics on "commit by author" and "commit by date" etc. I'd like to show similar statistics from TFS (or from TeamCity). Is this possible? 回答1: You can use the TFS API to create any queries you like. You can quite easily iterate through the changesets looking for all commits by a certain author, or commits in a certain date:

TeamCity, no clean-up for certain configuration. No pinned builds, no dependent builds

[亡魂溺海] 提交于 2019-12-04 09:06:35
I'm running TeamCity 5. I have one particular configuration that is preserving 3500+ past builds, with artifacts, from the last year or so. It's taking up almost 7 gigs of space so I need to clean up old builds. The configuration is set to clean up everything older than 30 days or 5 builds. None of the builds are pinned. No configurations on the server depend on the artifacts, and even if they did I have un-set "Prevent dependency artifacts clean-up". Other build configurations clean up, but this particular one doesn't. Anybody have ideas on what to check next? I figured it out. I wasn't

How do I download a protected file using PowerShell?

不问归期 提交于 2019-12-04 08:59:41
I am trying to download a file using PowerShell 3.0 from my TeamCity build server. I have configured TeamCity to use NTLM authentication but I cannot download the file directly and get redirected to login. I am trying to use the following PowerShell code to download the file. $artifacts = "http://teamcity/repository/download/bt1/.lastSuccessful/%7Bbuild.number%7D.zip" Invoke-WebRequest -Uri $artifacts -UseDefaultCredentials My response from the request is a redirection to the login page. Here is the code for the final solution . $artifacts = "http://teamcity/repository/download/bt1/

Log onto TeamCity server using REST API without passing credentials in the url

*爱你&永不变心* 提交于 2019-12-04 08:50:47
As a follow up to a previous question I asked: How to pass username and password in TeamCity REST API , I'd like to check on something. Can someone tell me if it's possible to access the TeamCity REST API in a more secure way, rather then passing the username and password in the url? It just seems crazy to me that passing credentials in the url is the only way, since it's so easy for a sniffer to get their hands on the url and use the credentials themselves. We faced the same problem and I spent some time to see how could we solve this problem and found a way: You do a get in the initial