使用智能构建器或大量调度器来编译和测试 5 个构建
我想设置一个具有三个操作系统(MacOSX、Windows 和 Linux)的持续集成环境。我需要构建五个不同的版本:win32bit、win64bit、lin32bit、lin64bit 和 mac。对于每个构建,我需要执行以下步骤:
-compile
-put some files in the binary folder
-make a 7z-archive of the binary folder
-upload the 7z-archive to a server
当然存在依赖关系。例如,当编译失败时,创建并上传 7z 存档是没有用的。
我的第一次尝试是构建一个调度程序和构建器的小型分层系统,但我不知道如何处理每个构建中的依赖关系:
我的计划(Start_scheduler 正在侦听 svn 提交):
\Start_scheduler, kicks off win_builder, lin_builder, and mac_builder
\win_builder, compiles and uploads win32bit and win64bit
-compile 32bit
-put some files in the binary folder
-make a 7z-archive of the binary folder
-trigger upload_scheduler to upload IF 32bit compile was succesful
-compile 64bit
-put some files in the binary folder
-make a 7z-archive of the binary folder
-trigger upload_scheduler to upload IF 64bit compile was succesful
\lin_builder, compiles and uploads lin32bit and lin64bit
-compile 32bit
-put some files in the binary folder
-make a 7z-archive of the binary folder
-trigger upload_scheduler to upload IF 32bit compile was succesful
-compile 64bit
-put some files in the binary folder
-make a 7z-archive of the binary folder
-trigger upload_scheduler to upload IF 64bit compile was succesful
\mac_builder, compiles and uploads mac
-compile
-put some files in the binary folder
-make a 7z-archive of the binary folder
-triggerupload_scheduler to upload IF compile was succesful
\upload_scheduler
-upload 7z-archive to central server
-send notification about new archive
基本上我有两个问题。首先,如何定义编译和上传之间的 IF 依赖性,但同时使 64 位编译独立于 32 位编译:即使 32 位失败,构建系统也应该尝试编译 64 位。 其次,是否可以对 upload_scheduler 进行参数化,以便我可以在每个构建中重用它?如果我需要为每个构建维护一个单独的 upload_scheduler,那将是乏味的。
I want to setup a continuous integration environment with three operating systems (MacOSX, Windows and Linux). I need to build five different builds: win32bit, win64bit, lin32bit, lin64bit, and mac. For each build I need to make the following steps:
-compile
-put some files in the binary folder
-make a 7z-archive of the binary folder
-upload the 7z-archive to a server
Of course there are dependencies. For example it is useless to create and upload a 7z-archive when compiling failed.
My first attempt was to build a small hierarchical system of schedulers and builders, but I don't know how to handle the dependencies in each build:
My plan (Start_scheduler is listening for svn commits):
\Start_scheduler, kicks off win_builder, lin_builder, and mac_builder
\win_builder, compiles and uploads win32bit and win64bit
-compile 32bit
-put some files in the binary folder
-make a 7z-archive of the binary folder
-trigger upload_scheduler to upload IF 32bit compile was succesful
-compile 64bit
-put some files in the binary folder
-make a 7z-archive of the binary folder
-trigger upload_scheduler to upload IF 64bit compile was succesful
\lin_builder, compiles and uploads lin32bit and lin64bit
-compile 32bit
-put some files in the binary folder
-make a 7z-archive of the binary folder
-trigger upload_scheduler to upload IF 32bit compile was succesful
-compile 64bit
-put some files in the binary folder
-make a 7z-archive of the binary folder
-trigger upload_scheduler to upload IF 64bit compile was succesful
\mac_builder, compiles and uploads mac
-compile
-put some files in the binary folder
-make a 7z-archive of the binary folder
-triggerupload_scheduler to upload IF compile was succesful
\upload_scheduler
-upload 7z-archive to central server
-send notification about new archive
Basically I have two problems. First, how can I define the IF-dependency between compile and upload, but at the same time make the 64bit compile independent from the 32bit compile: the build system should try to compile 64bit even if 32bit failed.
And second, is it possible to parametrize the upload_scheduler so I can reuse it for every build? It would be tedious if I would need to maintain a seperate upload_scheduler for each build.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
Java 端的 Ant 和 Cruise Control 很好地处理了这种事情。
我想知道 PyAnt 是否可以帮助您使用 Python 。
This kind of thing is handled nicely by Ant and Cruise Control on the Java side.
I wonder if PyAnt could help you with Python.
作为 Python 的持续集成系统,你几乎无法击败 Hudson(现在称为 Jenkins)。谷歌搜索“hudson python”。
You pretty much can't beat Hudson (now called Jenkins) as a Continuous Integration system for Python. Google for 'hudson python'.
您可以使用将在单个 buildslave 上运行的单独平台构建,而不是对 32 位和 64 位构建使用单个构建器。在这种情况下,32 位构建与 64 位构建分开构建,一个构建永远不会失败另一个构建。
关于上传调度程序,您可能需要查看 TriggerableScheduler 。
Instead of using single builder for both 32bit and 64 bit builds you may use separate platform builds which will be running on a single buildslave. In this case 32bit builds are built separately from 64bit builds and one build will never fail another.
Concerning upload scheduler, you might want to look at TriggerableScheduler.