Hudson 的经验 - 构建矩阵项目 [英] Experience with Hudson - Building matrix project

查看:32
本文介绍了Hudson 的经验 - 构建矩阵项目的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有人尝试过这个功能并有一些反馈?或者有人知道一些有用的样本可以查找吗?

Did anyone try that feature and has some feedback? Or Does anyone know some useful samples to look up?

推荐答案

我几个月前尝试过这个功能,但我不再使用它(只是因为我不需要它,而不是因为它不是不错的功能).

I have tried this feature some months ago, but I don't use it anymore (just because I don't need it, not because it is not a good feature).

基本上,您定义了 n 个轴,每个轴都是一个具有多个值的属性.

Basically, you define n Axis, each axis is a property with several values.

让我们举个例子:你定义轴JDK",可能的值是1.4"、1.5"、1.6",你定义另一个属性数据库",其中可能的值是oracle"、"mysql".

Let's go with an example: you define the Axis "JDK", with possible value "1.4", "1.5", "1.6", and you define another property "database", where possible values are "oracle", "mysql".

因此,Hudson 将启动您的构建 6 次:

Thus, Hudson will launch your build 6 times:

  • 使用 JDK 1.4,使用属性 database=oracle(即 JVM 使用 -Ddatabase=oracle 启动)
  • 使用 JDK 1.5,使用属性 database=oracle
  • 使用 JDK 1.6,使用属性 database=oracle
  • 使用 JDK 1.4,使用属性 database=mysql
  • 使用 JDK 1.5,使用属性 database=mysql
  • 使用 JDK 1.6,使用属性 database=mysql

然后,一旦一切都完成了,您将能够看到每次迭代的结果.

Then, once everything is finished, you will be able to see the results for each iteration.

当您需要在多种环境(在我的示例中,使用不同版本的 JDK 或数据库)测试应用程序时,此功能可能非常有用.

This feature may be really usefull when you need to test your application in several environments (in my example, with different versions of JDK or database).

请注意,除了 JDK 轴之外,您必须自己管理 Hudson 作为条目给出的属性.在我的示例中,应用程序必须考虑数据库"属性本身.最后,如果您的项目是 mavenized(参见 此处 了解更多详情.

Note that except for the JDK axis, you have to manage by yourself the property given as entry by Hudson. In my example, the application must take into account the "database" property itself. Eventually, a good idea is to use this property to enable a particular profile in the Maven2 configuration, if you project is mavenized (see here for more details about that).

我希望我的解释足够清楚:)

I hope my explanations are clear enough :)

这篇关于Hudson 的经验 - 构建矩阵项目的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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