One Build For One Agent

You are viewing an old version (v. 5) of this page.
The latest version is v. 8, last edited on Sep 18, 2011 (view differences | )
<< View previous version | view page history | view next version >>

Situation

Set up the build so that one agent runs only one build at a time. If all agents are occupied, the build should be waiting.

Demonstration

  1. Check grid tab on the demo site, and there are two agents available.
  2. Visit the demo project, and hit the run button three times to generate three builds.
  3. The first two builds will be running, each occupying an agent. The third will be waiting. When one of two running builds finished, the third one will start to run.

Resolution

  1. Switch to resources tab and a resource named "Agent" is defined with each agent providing one resource.
  2. Switch to steps definition of the demo project, and check the master step definition. The node selection property is set to run on the node with resource agent. If resource requirement of the master step is not satisfied, the build itself will be put into waiting state.
  3. This also holds true for builds from different configurations as long as their master step is defined to run on node with the agent resource.
Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.