开发者

Can anyone give an example of how to configure Bamboo to build an Xcode project?

I've been searching for how to configure Bamboo (a continuous integration system) to build an Xcode project. This should be pretty simple, as it is just getting it to run a shell command such as:

xcodebuild -project ProjectName -target TargetName -configuration ConfigType

However this is proving more difficult than expected. I've investigated creating a "custom builder" for the xcodbuild command (tells Bamboo about the command) but then it only seems to let you pass ONE argument to the command not the multiple that the xcodebuild command requires. Any help or pointers would be muc开发者_高级运维h appreciated, including links to any appropriate examples (I couldn't find any.) Thanks.


OK, I got a "HelloWorld" example working by choosing the "script" option with a shell script rather than a "custom builder" and trying to tell Bamboo how to use xcodebuild command directly. Just specified a script like below.

#!/bin/bash
/usr/bin/xcodebuild -project TestProject/TestProject.xcodeproj -target TestProject -configuration Release build


That might have done the trick but there is a more generic way to do it. You can define in your agent capabilities as a Command to execute /usr/bin/xcodebuild. Then in your tasks after you checkout your code, you can define a task Command, and you can select Xcode from the drop down list and provide the arguments needed for the project in the relevant input -workspace YourProject.xcworkspace -scheme YourProject. This approach provides more flexibility since Xcode installation can differ from agent to agent but bamboo will still be able to forward your builds properly where they can be build.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜