设置为iPhone应用程序的自动生成服务器的最佳实践? [英] Best practice for setting up an automated build server for iphone apps?

查看:128
本文介绍了设置为iPhone应用程序的自动生成服务器的最佳实践?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在找设置一个自动执行的夜间构建服务器为我们的iPhone应用程序,并寻找有关什么可行的建议,什么不可行。

I'm looking to setup an automated nightly build server for our iphone apps, and looking for advice on what works and what doesn't.

基本上,至少在夜间运行所有的单元测试和一些出版新的即席建立我们的内部网站。

Basically, something that at least nightly runs all the unit tests and publishes a new adhoc build to our internal website.

所有的开发者使用笔记本(which'll熄灭过夜),所以我考虑让一个专用的Mac Mini做到这一点。

All the developers use laptops (which'll be off overnight), so I'm considering getting a dedicated Mac Mini to do this.

我不知道我是否应该得到标准的Mac OS X或服务器版本。

I'm not sure if I should get standard Mac OS X or the server edition.

至少在第一次尝试,我正在考虑使用刚刚从crontab中运行一个简单的shell脚本来完成实际的工作。在未来一个完整的持续集成服务器(哈德森等)将是一件好事。

At least for the first attempt, I'm considering just using a simple shell script run from a crontab to do the actual work. In the future a full continuous integration server (hudson etc) would be good.

我已经找到通过搜索一些文章,虽然他们非常简短:

I've already found a few articles through searching, though they're quite brief:

<一个href=\"http://nachbaur.com/blog/how-to-automate-your-iphone-app-builds-with-hudson\">http://nachbaur.com/blog/how-to-automate-your-iphone-app-builds-with-hudson

<一个href=\"http://blog.jeffreyfredrick.com/2008/11/27/continuous-integration-for-iphonex$c$c-projects/\">http://blog.jeffreyfredrick.com/2008/11/27/continuous-integration-for-iphonex$c$c-projects/

和也是这个计算器的问题有一些有用的软件信息(尽管它两岁了):

and also this stackoverflow question has some useful software info (though it's two years old now):

<一个href=\"http://stackoverflow.com/questions/212999/continuous-integration-for-x$c$c-projects\">http://stackoverflow.com/questions/212999/continuous-integration-for-x$c$c-projects

任何指导的人可以给他们如何已经设置构建服务器和任何潜在的问题将大大AP preciated。

Any guidance people can give on how they've setup a build server and any potential issues would be greatly appreciated.

谢谢!

约瑟夫

推荐答案

哈德森(或其叉詹金斯)真的不是很难成立;这是我们内部使用。我们不只是运行iPhone从它建立 - 事实上,也只有只有一个孤零零的Mac mini设置为iPhone构建,它是一个相对较新的补充。我们已经有其他不同的平台上有一个半打其他奴隶一段时间了。

Hudson (or its fork Jenkins) is really not hard to set up; it's what we use internally. We don't just run iphone builds from it -- in fact, there's only only one lone mac mini set up for iphone builds, and it's a relatively recent addition. We've had a half-dozen other slaves on it for other different platforms for some time.

您可以通过在符合哈德森用它玩页面以获取它是多么容易建立的感觉。 (这是卖给我的上面的东西;它是很容易上手,但仍然可配置,可扩展和强大到足以让我们扩大在过去的几年中,它代替手工的真正缺憾一堆。冷轧脚本和程序,尽管是的作者,我很高兴地看到安息。)

You can play with it through the "Test Drive" link on the Meet Hudson page to get a feel for how easy it is to set up. (This is one of the things that sold me on it; it was really easy to get started with, but still configurable, extensible, and powerful enough to keep us expanding over the last few years. It replaced a really kludgy pile of hand-rolled scripts and programs that, despite being the author of, I was very happy to see laid to rest.)

我们有一个健壮的Mac OSX服务器上运行的哈德逊后端,但没有理由你不能运行pretty随时随地得多(Linux操作系统,Windows和Mac)。

We have the hudson backend running on a beefy Mac OSX server, but there's no reason you couldn't run it pretty much anywhere (linux, windows, mac).

至于配置它的建筑 - 这是关于6 shell脚本的线路中的项目配置,主要是呼吁 X codebuild ,并通过它 -project -configuration 参数。

As for configuring it for building -- it's about 6 lines of shell script in the project configuration, mostly calling xcodebuild and passing it -project and -configuration arguments.

例如:

cd ${WORKSPACE}/Engineering/

set -e
set -v

xcodebuild -project foo.xcodeproj -alltargets -configuration Distribution clean
xcodebuild -project foo.xcodeproj -alltargets -configuration Release clean
xcodebuild -project foo.xcodeproj -alltargets -configuration Debug clean

xcodebuild -project foo.xcodeproj -alltargets -configuration Distribution
xcodebuild -project foo.xcodeproj -alltargets -configuration Release
xcodebuild -project foo.xcodeproj -alltargets -configuration Debug

我们还没有建立从作为服务运行,但 - 这是待办事项清单。现在我们只是通过JNLP启动它,每当我们重新启动它的迷你。

We haven't set up the slave to run as a service yet -- this is on the TODO list. For now we just launch it via JNLP whenever we reboot the mini it's on.

Repository是SVN,和哈得逊主需要记住HTTPS验证信息对我们的照顾。

Repository is SVN, and the hudson master takes care of remembering the https auth info for us.

我们积极利用电子邮件-EXT 的插件,并有一个构建超时插件和审计跟踪的插件,因为有很多使用该系统的其他人以及一些版本是不是乖巧。我们已经尝试用简单的警告插件和的静态code分析插件为好,需要让那些在更多的项目中使用(我们通常警告作为错误的版本,但我们确实使用PC-绒及其它工具上的一些项目;其输出聚集在这里追踪是非常好的)。最后,所有重要的查克·诺里斯并的情感哈德森插件。

We actively use the Email-ext plugin, and have a build timeout plugin and an audit trail plugin since there are a lot of other people using the system and some of the builds are not well-behaved. We've experimented briefly with the Warnings plugin and Static Code Analysis plugins as well, need to get those used on more projects (we usually have warnings as errors in builds, but we do use PC-Lint and other tools on some projects; having output aggregated and tracked here is very nice). Finally the all-important Chuck Norris and Emotional Hudson plugins.

我们目前并没有任何的iPhone运行单元测试(耻辱!)构建,我们只是使用内置到哈德森普通存档神器功能的存储基础之上。这些可以通过通过哈德森Web界面授权用户访问。我毫不怀疑,它会不会是你很难框架内运行单元测试。

We're currently not running unit tests (shame!) on any of the iphone builds, and we just use the ordinary "Archive the Artifacts" functionality built into hudson for storing builds. These can be accessed via authorized users via the hudson web interface. I've no doubt that it would not be hard for you to run your unit tests within the framework.

&LT; /变形金刚迷&GT;

</fanboy>

我们的唯一真正的问题已经与AFP和SMB做Mac mini上 - 无关,与哈德森可言,更多的只是我们的内部网络基础设施。和Mini是我的口味有点慢 - 我们通常的理论,快速周转自动构建是一件好事,运行pretty仡构建奴隶。迷你可有天赋的SSD因为这个原因在某些时候。

Our only real issues have had to do with AFP and SMB on the mac mini -- nothing to do with hudson at all, more just our internal network infrastructure. And the mini is a bit slow for my tastes -- we usually run pretty beefy build slaves on the theory that quick autobuild turnaround is a good thing. The mini may be gifted an SSD for this reason at some point.

这篇关于设置为iPhone应用程序的自动生成服务器的最佳实践?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆