7 Replies Last post: Sep 16, 2013 1:38 PM by cubiq4  
Daniel Szabo Newbie 48 posts since
May 2, 2013
Currently Being Moderated

Sep 14, 2013 10:01 PM

dynamically select the build agent based on a build parameter

Is this supported in some way?

 

I know that I can set a static requirement using the agent requirements section for example if os name contains windows, etc.

 

But how do I create a dynamic requirement for a single build configuration? Let's say I have a build parameter defined on the build config with 2  selectable list items 'A' and 'B'. Default is 'A', so build should routed to agents with 'A' defined somewhere (in their environment, whatever), but I want to route builds to agents that have 'B' defined if the user selects this option in the run dialog.

 

Currently I don't see any way to achieve this, only by creating two build configurations and hardcode the 'A' and 'B' requirements, respectively.

Nathan Stohlmann Newbie 5 posts since
Aug 6, 2013
Currently Being Moderated
Sep 15, 2013 12:26 AM in response to: Daniel Szabo
Re: dynamically select the build agent based on a build parameter

I haven't tried it, and I'm not connected to the work network to give it a try, but can you put a parameter in that gets evaluated? So, the setting would look something along the lines of "system.agent.name contains BldSvr%value%". Though if that works then where you are going to set that parameter from is the next question.

cubiq4 Newbie 28 posts since
Jun 16, 2011
Currently Being Moderated
Sep 16, 2013 7:26 AM in response to: Daniel Szabo
Re: dynamically select the build agent based on a build parameter

Not currently, something I'd really like as we currently get around this by using the REST API to update the agent requirements directly.  I'd like to accomplish the same thing with properties by moving one project under a certain project node to another with a different agent property

 

Please vote here

 

http://youtrack.jetbrains.com/issue/TW-19877

cubiq4 Newbie 28 posts since
Jun 16, 2011
Currently Being Moderated
Sep 16, 2013 1:15 PM in response to: Daniel Szabo
Re: dynamically select the build agent based on a build parameter

The documentation isn't great but it's here http://confluence.jetbrains.com/display/TW/REST+API+Plugin#RESTAPIPlugin-Agents

 

I had trouble myself and asked on this post http://devnet.jetbrains.com/message/5463348#5463348

 

It's you still can't work it out let me know and I'll look it up when I'm in work again.

 

I don't have quite the same requirements as you where I only need to change the agent to ensure builds that are in UAT get assigned to a dedicated agent whereas Development builds have a lower priority and use another agent.

More Like This

  • Retrieving data ...