Skip to main content

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 GoubetFriend
Messages: 1857
Registered: July 2009
Senior Member

We have a matrix job that builds EMF Compare for four different target platforms (Luna M5, Kepler, Juno and Indigo) : 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 :


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 ( 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
Previous Topic:Getting svn exception when we do a checkout from hudson and the build fials
Next Topic:3.1.2 Release Candidate is Available
Goto Forum:

Current Time: Tue Jun 19 16:39:44 GMT 2018

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

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

Back to the top