Experience with the Hudson project - Building matrix

Has anyone tried this feature and got some feedback? Or does anyone know some useful search patterns?

+23
continuous-integration hudson jenkins
Jan 08 '09 at 13:52
source share
2 answers

I tried this function a few months ago, but I don’t use it anymore (simply because I do not need it, and not because it is not a good function).

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

Let’s go through an example: you define the "JDK" axis with possible values ​​of "1.4", "1.5", "1.6", and you define another property database where the possible values ​​are "oracle", MySQL ".

Thus, Hudson will launch your assembly 6 times:

  • with JDK 1.4, with the property database = oracle (i.e., the JVM starts with -Ddatabase = oracle)
  • with JDK 1.5, with property base = oracle
  • with JDK 1.6, with property base = oracle
  • with JDK 1.4, with property database = mysql
  • with JDK 1.5, with property database = mysql
  • with JDK 1.6, with property base = mysql

Then, once everything is finished, you can see the results for each iteration.

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

Note that in addition to the JDK axis, you must independently manage the Hudson property. In my example, the application should consider the "database" property. In the end, a good idea is to use this property to include a specific profile in the Maven2 configuration if you are designing mavenized (see here for more details on this).

Hope my explanations are clear enough :)

+27
Jan 08 '09 at 14:07
source share

Matrix assemblies have a number of problems:

  • In general, incompatible with plugins - they are getting better, but you need to be aware of the latest developments.
  • Artifacts - much harder to break out - URls are a little harder to find on FS (which you should avoid) - this is now a nightmare.

What a shame, because the concept is very good and very convenient where it works.




Edit

  • Inability to run individual points.

Our usual way is to configure parameterized assemblies that will run at the same time - which is related to our own problems, but will save us a lot of tasks with the same code and different constants.

+6
Jun 02 2018-11-11T00:
source share



All Articles