YouTrack Gotcha

LDAP integration

Our ldap connection string is something like ldap://dcxx:389/DC=domain,DC=gov,DC=ds, a little bit different than the example givenĀ ldap://xxx:389/cn=users,dc=domain,dc=com

Also, needs to enable user registration via registration page, otherwise ldap user cannot login.

By default, newuser (All Users) group already has admin role added in, so ensure you remove it before allow ldap user login, otherwise all new users will be admin!

TeamCity integration

New YoutTrack project code must be added in TeamCity Tracking module, otherwise issue tab does not show in teamcity build dashboard.

The way YouTrack link to TeamCity is not by userid or name, instead it is by email address. It’s strange our YouTrack can grab email from our ldap server, while TeamCity can’t! This leaves the email field in user project empty in teamcity. When we try to use comments command, the error message was, user not found, no email specified for user (commiter).

Command in Comments

Comment format: your own comment. #PROJECT_ID-1 state Fixed

Watch out, don’t add .(dot) after fixed.

more command example:

Project assignee

Newly created project doesn’t have any team member in it, the result is when trying to assign a issue, error message just kept saying assignee expected.


Transform NCover xml output on TeamCity

Comparing to, there is no xml/xlst transaformation in teamcity, or I still haven’t found how to do it yet. The NCover HTML report will be displayed in iframe of a tabpage.

TeamCity recommend using NUnit2 for NAnt users, I tried adding runtime redirect in test configĀ  file, no go, and I don’t like this messy work around either.

So using exec task for NUnit, passing server message to teamcity as shown in NCover official doc for TeamCity integration.

One thing hit me is that the output folder must be set to {}, other folder doesn’t bring html result to tabpage, instead teamcity will display an auto-gened index.html with one line warning message:

This is an autogenerated index file (there was no index.html found in the generated report).
The coverage xml ouput is automatically included in artifact, watch out the hidden/show link.
Be default .teamcity folder is hidden, click show link, it should appear like this:
The idea of this is to allow user open xml in NCover client, or do xlst transformation by their own?
In XML report processing plugin, there is no report type related to NCover.

Enable svn proxy on TeamCity server

Problem described as this post. We need to setup a CI for an external svn repository on teamcity server sitting behind the firewall.

(NOTE: if setting proxy is too hard for you, the easiest workaround is to create a local git clone, then share this folder, say, \\tcserver\gitrepo, in teamcity VCS fetch url section, set it to this exact same sharing name, \\tcserver\gitrepo, the build will be hooked up. Obviously you don’t have the real trigger setup, you need to manually git pull to local before you trigger the build, a little bit complex, but it works.)


On we have the svn Tortoise client installed so we can easily control proxy through TortoiseSVN settings->Network, Enable Proxy Server. But TeamCity has its own svn library, SVNKit, how to configure proxy then?

According to SVNKit,

By default SVNKit uses proxy settings from the servers configuration file that is located in the default SVN run-time configuration area.

And that stackoverflow post did point out the area to look for should be:

  • C:\Users\AccountName\AppData\Roaming\Subversion\servers on Vista/7/2008 (domain account)
  • C:\Windows\ServiceProfiles\LocalService\AppData\Roaming\Subversion\servers on Vista/7/2008 (service account)
  • C:\Documents and Settings\AccountName\Application Data\Subversion\servers on XP/2003

It’s very confusing that teamcity use C:\Windows\system32\config\systemprofile\AppData\Roaming\Subversion as default config folder. For some reason this folder is set to system folder on our server, which caused a lot of trouble to us.

Switching to a regular folder, e.g., c:/tmp, even C:\Users\TCADMIN\AppData\Roaming\Subversion, when first time clicking test connection button, it will create three files in that folder: config, servers and README.

To set proxy,we just need to open servers file, change the those settings:

http-proxy-host =
http-proxy-port = 80
http-proxy-username = blah
http-proxy-password = doubleblah

If VCS checkout mode is set to Automatically on Server, this is all we need. If VCS checkout mode is set to Automatically on Agent, watch out! The config folder will be created on agent machine, and another auto-generated servers file! We have to change this servers file again, and the proxy username is not for agent, it should be the one works on Server!