It's all about the answers!

Ask a question

How to set build engine when requesting build definition from ANT task?

Glenn Herbert (12657) | asked Oct 04 '12, 5:44 p.m.
edited Oct 04 '12, 5:45 p.m.
I have a build definition (defn) which supports multiple build engines. When the defn is run within the client, the user can choose Build Options->Build Engine->Browse from the Request Build dialog panel then select which build engine they desire to use. In most cases we do NOT want the first available from the pool of build engines but want the task to execute on a specific OS, such as Solaris, AIX, Itanium, or Windows.  We are using RTC v3.0.1.1.

I am trying to get a similar behavior when using the ANT build toolkit tasks, but find no (documented) way to do this. The user properties of the defn (and the buildLabelPrefix) can be readily changed using overridePropertiesFile with the requestTeamBuild task, but is there a property that can be set to declare the Build Engine for a requested build definition? For example we want to start the defn using the Windows build engine to kick off a windows regression test. If I am able to select the Build Engine from within the client, I should be offered similar functionality from the requestTeamBuild (or startTeamBuild) tasks.

An alternative would be to create a separate build definition for each Build Engine, but that seems rather inefficient as the only difference in the request is the Build Engine (besides clogging up the Builds section in the client with many similar named build defns as it doesn't support Folders).

Any help would be appreciated!

2 answers

permanent link
Jeff Foege (45256860) | answered Oct 04 '12, 6:28 p.m.
I would have a different build definition for each platform you are supporting. I have two different build definitions executing different ant targets based on what I want to accomplish. You will need a build engine on each of the platforms you are targeting. Then the user selects which one they want to build.

but is there a property that can be set to declare the Build Engine for a requested build definition? Not that I'm aware of. However as you said the documentation is a little lacking especially in v3.

permanent link
Nick Edgar (6.5k711) | answered Oct 27 '13, 1:06 p.m.
Hi Glenn, unfortunately that's not currently supported.  We have an existing enhancement request for it here:

Nick Edgar commented Oct 27 '13, 1:07 p.m.

It might be possible to script something using curl, to request the build via our REST interface.  Let me know if you'd like to explore this. 

Your answer

Register or to post your answer.