Your browser was unable to load all of the resources. They may have been blocked by your firewall, proxy or browser configuration.
Press Ctrl+F5 or Ctrl+Shift+R to have your browser try again.

One Build for one Agent #2386

greha ·
Hi,

i followed the manual: http://wiki.pmease.com/display/QB50/One ... +One+Agent

Scenario:

Trunk ( every 30 mins if changes ) // Trunk triggers all ChildConfigs in a special order ( about 100 Configs )
----a ( every 5 mins if changes) // Some configs should run during the day if changes are detected
----b (every 7 mins if changes)
----c
.
.
.
----n

The basic idea is to block a and b from running on their own ( change detected ) when trunk is running BUT to let them run if trunk is triggering them.

So if trunk is running, he occupies 1 resource -> that's good.
But a and b aren't starting because trunk occupied the resource, and a and b have the same node selection in their master step like trunk.

Any ideas on how to solve this scenario? More build agents aren't an option at the moment <!-- s:( --><img src="{SMILIES_PATH}/icon_sad.gif" alt=":(" title="Sad" /><!-- s:( -->
  • replies 1
  • views 867
  • stars 0
robinshen ADMIN ·
So I guess if trunk runs, a and b will always run on the same node selected by trunk? If so, when define the trigger build step for a or b in trunk, pass a variable say with name "allocatedNodeAddress" and set its value to "${node.address}". Then script node selection setting of steps of configurations a and b to select node with below script evaluating to true:
groovy:
def allocatedNodeAddress = vars.getValue("allocatedNodeAddress");
if (allocatedNodeAddress == null)
return node.hasResource("resource");
else
return node.address == allocatedNodeAddress;


Here "resource" assumes to be name of your resource. With this script, configuration a and b will only claim resource requirement if it is not triggered from trunk, and simply use the node running trunk configuration if they are fired by trunk.