We're moving from a combination of CC/CC.NET to TeamCity.
The core of our product is Windows but we have a Mac agent.
We have our VCS checkout mode set to "Automatically on server". Meaning the source will be checked out on the (Windows) server and then copied to the agents (including the Mac agent) as needed.
Our product uses the BWToolkit framework for a portion of its UI. This means that we store the framework in our source control.
The issue is that the source copy from the TeamCity server screws up the symbolic links within the framework directory. This results in our product failing to build (error: BWToolkitFramework/BWToolkitFramework.h: No such file or directory
).
This is how an ls -l
from inside the root framework directory looks on my machine:
total 24
lrwxr-xr-x 1 myuser admin 35 Nov 22 10:45 BWToolkitFramework -> Versions/Current/BWToolkitFramework
lrwxr-xr-x 1 myuser admin 24 Nov 22 10:45 Headers -> Versions/Current/Headers
lrwxr-xr-x 1 myuser admin 26 Nov 22 10:45 Resources -> Versions/Current/Resources
drwxr-xr-x 5 myuser admin 170 Nov 22 10:45 Versions
And this is how it looks on the build machine:
total 24
-rwxrwxr-- 1 root admin 40 Nov 19 16:21 BWToolkitFramework
-rwxrwxr-- 1 root admin 29 Nov 19 16:21 Headers
-rwxrwxr-- 1 root admin 31 Nov 19 16:21 Resources
drwxrwxr-- 4 root admin 136 Nov 19 16:21 Versions
In addition instead of appearing as links on the build machine (little arrow overlay on icon) they appear as files with the unix executable icon. If you open one of these files that should be a link you get something similar to the following (this from the BWToolkitFramework link):
link Versions/Current/BWToolkitFramework
This appears to be an issue with the server checkout option in TeamCity because CruiseControl is running on the same machine doing a direct SVN checkout and I've had no issues开发者_运维技巧.
Is there any way to fix this other than changing our TeamCity configuration to use the SVN checkout on client option?
I filed this issue as TW-14499 in hopes of an official response/fix.
It was just marked as a duplicate of TW-5953 Symlinks are not supported for SVN server-side checkout, so this is a known issue that's been open about 2 years. If anybody else runs into it please vote for/comment on the issue in hopes that it will get fixed.
Apparently, jgit has fixed this as of 12/4/2014 so TeamCity will fix this eventually. Workaround is to tell TC to use client side agent for git checkouts.
Similar to this one(just it's git): http://youtrack.jetbrains.com/issue/TW-12648
In my case it worked with SVN when checking out on agent instead of the server. You can change this in the Build Configuration at Version Control Settings.
Here's my scenario:
- I need to use server side checkout
- I'm using Git
Since TeamCity doesn't have this fix in place, I created a command line script to run right after my sources are updated with the following example:
rm /Git/MyLibrary/External/FacebookSDK/FacebookSDK.framework/Headers
rm /Git/MyLibrary/External/FacebookSDK/FacebookSDK.framework/Resources
ln -s /Git/MyLibrary/External/FacebookSDK/FacebookSDK.framework/Versions/A/Headers /Git/MyLibrary/External/FacebookSDK/FacebookSDK.framework/Headers
ln -s /Git/MyLibrary/External/FacebookSDK/FacebookSDK.framework/Versions/A/Resources /Git/MyLibrary/External/FacebookSDK/FacebookSDK.framework/Resources
This script is recreating the symbolic links on my mac server.
精彩评论