2

I am running TeamCity 7.1.3 (yeah, I know it's an oldie). I have a Mac OS X Yosemite build agent. I started the agent in the recommended way, sh bin/agent.sh start.

My build configuration contains one command line build step, but it can't run, because I get the following message on my agent:

Incompatible runner: Command line

I think it is a permission issue, because if I start the agent with sudo sh bin/agent.sh start it works. I don't want to run it with sudo though. Is there a permission I can give my agent account to make this work?

Update: it seems "chmod 777" on the buildAgent folder solved the problem. Of course, it is not the most secure idea. Would be happy to know the lowest permissions I need to apply.

Doron Yaacoby
  • 9,412
  • 8
  • 48
  • 59

1 Answers1

2

When you installed the agent, did you use the Mac setup script in the agent's bin directory? I believe it's called mac.launchd.sh. You can't run it via remote terminal or Apple's Remote Desktop or you'll have issues. From the machine (or via VNC) login as the user you want to run TeamCity and run that script from Terminal. Then the agent will start on user login, and will properly upgrade itself when you finally get to upgrading to the latest TeamCity.

My experience with Mac OS X TeamCity agents improved greatly when I stopped trying to run it in the background as a 'daemon' (launchd's term for a boot service) similar to Linux, and instead ran it as an 'agent' (on login service). Typically on a Mac OS build agent you'll want auto login enabled for bits of Xcode to work correctly. Then you just lock it with a screen saver.

danieljimenez
  • 1,390
  • 4
  • 17
  • 26
  • Yes, I did run the install script directly from the machine. I'm not trying to run the agent as a daemon, I just want it to work even when run manually. – Doron Yaacoby Feb 23 '15 at 09:37
  • Hm there really isn't a manual run, if you run that script it should turn the agent into a daemon. – danieljimenez Feb 23 '15 at 15:19
  • @DoronYaacoby I just posted a repo that will turn any Mac OS machine into a build agent. You just have to clone it and overwrite an attribute that points to the build server: https://github.com/foreflight/foreflight_build_agent – danieljimenez Feb 23 '15 at 15:25