Setting up TeamCity to integrate to OSX Build Agent
Asked Answered
O

1

4

Following on from my question on Setting up Teamcity to build Android, I now have the fun challenge of doing the same for an iOS project!

What I would like to do is have a TeamCity job (along with all our other Teamcity jobs) to build an iOS Codebase + run unit tests.

I'm aware to build iOS we need an OSX Build Agent with XCode installed. It won't work on Windows.

What I'd like to know is ... has anyone successfully done this, integrated a Windows TeamCity instance with an OSX Build Agent running on another machine?

Are there any cloud providers that have OSX Virtual Machines we can rent to install a build agent?

Osteomalacia answered 4/2, 2016 at 12:4 Comment(1)
I've just given up trying to do a push installation ... how painful?Inkster
R
3

Installation procedure for MacOS agents does not differ from that under Windows or Linux. Have a look at corresponding section in the documentation.

Basically, what you need to do is:

  1. unpack the zip file
  2. edit buildAgent.properties file to let the agent know where the server is
  3. run agent.sh start
  4. authorize the agent on the server
Rogovy answered 4/2, 2016 at 12:10 Comment(4)
OK awesome, so its possible to have a Build Agent located on an OSX box and TeamCity itself on a Windows Box ?Osteomalacia
Yes. As both server and agent are written in java, the OS does not matter. However certain features will be disabled on the agent depending on OS (for example, xcode build is not available under Windows and Linux, .net features are not available under Linux and MacOs (yet))Rogovy
A little "gotcha" to watch out for: after downloading the agent .zip file and extracting it to OSX, I found that the buildAgent.properties file does not exist, only a buildAgent.dist.properties. This will prevent the agent from starting. I simply copied the existing file and renamed it to buildAgent.properties and the setup was able to continue fine.Avalos
What I find lacking in this answer is how to maintain this machine over the course of a long time. Who do you login as on the mac build agent? Can you leave anyone logged out, and still have the service running?Fascicle

© 2022 - 2024 — McMap. All rights reserved.