Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Hudson » Parameterized builds using shell
Parameterized builds using shell [message #1239152] Mon, 03 February 2014 13:52
Laurent Goubet is currently offline Laurent Goubet
Messages: 1625
Registered: July 2009
Senior Member
Hi,

We have a matrix job that builds EMF Compare for four different target platforms (Luna M5, Kepler, Juno and Indigo) : https://hudson.eclipse.org/emfcompare/job/master-nightly/. However, some of the modules we builds do not compile on Indigo, that's known and we need to disable them from the build on that particular platform.

One solution we thought about was to split our "modules" list into a set of profiles ("core" profile for the core, "uml" profile for the uml-specific modules...) and combine the profiles according to the target platform.

For that, we tried to use the "platform" property directly and activate the profiles according to its value :

<profile>
  <id>ui</id>
  <activation>
    <property>
      <name>platform</name>
      <value>luna</value>
    </property>
    <property>
      <name>platform</name>
      <value>kepler</value>
    </property>
  </activation>
  <modules>
    ...
  </modules>
</profile>


But... well, profiles won't allow two conditions of the same type ("property"). So this cannot be used (unless we can change "value" to "contains" or something that would use an "or" operator?).

We then tried to directly specify the list of profiles to activate from the hudson configuration. This requires a little shell script to set the necessary list according to the "platform" axis... But a "Execute Shell" build step cannot "export" an environment variable for use within a subsequence "Invoke Maven" build step (http://stackoverflow.com/questions/1329986/set-environment-variable-for-build-in-hudson)... and it seems like the "envInject" plugin is not compatible with hudson.

All parameters we pass to the "Invoke Maven" build step are either totally escaped (no shell execution anywhere) or plain hardcoded. The only substitution that happens are with "Hudson" variables ... which we cannot value with the result of shell scripts.

Is there any way at all to set a "complex" parameter to an hudson build? Something that a user cannot value (not a plain String) and has to be computed from a script of some sort?

It seems like the only way to do something that would resemble this would be to setup two jobs : one that will execute a shell script that will write its result in the workspace (as a property file) and the second that would be triggerred with these results as parameters... Seems overkill for what sounds like a simple need.

Laurent Goubet
Obeo
Previous Topic:Active Directory configuration problem
Next Topic:3.1.2 Release Candidate is Available
Goto Forum:
  


Current Time: Sat Sep 20 10:07:52 GMT 2014

Powered by FUDForum. Page generated in 0.02588 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software