How do I stop TeamCity from turning symbolic links into files when using server checkout mode with a Windows server and a Mac agent?
Asked Answered
V

4

15

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?

Vanna answered 22/11, 2010 at 19:33 Comment(0)
V
14

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.

Vanna answered 22/11, 2010 at 20:45 Comment(0)
A
6

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. enter image description here

Adonic answered 12/5, 2015 at 13:49 Comment(0)
R
4

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.

Ranite answered 24/2, 2013 at 12:30 Comment(0)
B
2

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.

Bufordbug answered 15/7, 2014 at 20:31 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.