0

我想建立一个包含三个操作系统(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-archive 是没有用的。

我的第一次尝试是构建一个由调度器和构建器组成的小型分层系统,但我不知道如何处理每个构建中的依赖关系:

我的计划(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,那将是乏味的。

4

3 回答 3

0

您可以使用单独的平台构建,而不是对 32 位和 64 位构建使用单个构建器,这些构建器将在单个 buildslave 上运行。在这种情况下,32 位构建与 64 位构建是分开构建的,并且一个构建永远不会使另一个构建失败。

关于上传调度程序,您可能需要查看TriggerableScheduler

于 2011-03-08T20:35:59.460 回答
0

作为 Python 的持续集成系统,你几乎无法击败 Hudson(现在称为 Jenkins)。谷歌搜索“哈德逊蟒蛇”。

于 2011-02-05T02:35:10.647 回答
0

这种事情在 Java 端由 Ant 和 Cruise Control 处理得很好。

我想知道PyAnt是否可以帮助您使用 Python。

于 2011-02-04T21:19:30.900 回答