I have a farm consisting of twelve agents; six Windows 2008 amd64, and six Windows 2003 x86.
These are further subdivided into agents running in two different Windows domains (englab.qa and englab.local).
My node selection criteria is 'matching all specified criteria'
- on Windows node
- on any build agent
- script evaluating to true:
groovy: node.getAttribute("PROCESSOR_ARCHITECTURE").compareToIgnoreCase(vars.getValue("param_serverBitness")) == 0
- script evaluating to true:
groovy: node.getAttribute("USERDNSDOMAIN").compareToIgnoreCase(vars.getValue("param_serverDomain")) == 0
The requestor is then able to specify values for param_serverBitness and param_serverDomain from drop-down lists.
I also have a semaphore lock to prevent multiple jobs running on the same system at the same time:
groovy: node.getResource("SingleThread", new java.util.concurrent.Semaphore(1)).acquire();
groovy: node.getResource("SingleThread").release();
I have found that, if I trigger four jobs all with the same values for param_serverBitness and param_serverDomain, the first three run on the nodes which satisfy those criteria. The fourth job runs on a randome node with the correct USERDNSDOMAIN, but the wrong PROCESSOR_ARCHITECTURE.
Description
I have a farm consisting of twelve agents; six Windows 2008 amd64, and six Windows 2003 x86.
These are further subdivided into agents running in two different Windows domains (englab.qa and englab.local).
My node selection criteria is 'matching all specified criteria'
- on Windows node
- on any build agent
- script evaluating to true:
groovy: node.getAttribute("PROCESSOR_ARCHITECTURE").compareToIgnoreCase(vars.getValue("param_serverBitness")) == 0
- script evaluating to true:
groovy: node.getAttribute("USERDNSDOMAIN").compareToIgnoreCase(vars.getValue("param_serverDomain")) == 0
The requestor is then able to specify values for param_serverBitness and param_serverDomain from drop-down lists.
I also have a semaphore lock to prevent multiple jobs running on the same system at the same time:
groovy: node.getResource("SingleThread", new java.util.concurrent.Semaphore(1)).acquire();
groovy: node.getResource("SingleThread").release();
I have found that, if I trigger four jobs all with the same values for param_serverBitness and param_serverDomain, the first three run on the nodes which satisfy those criteria. The fourth job runs on a randome node with the correct USERDNSDOMAIN, but the wrong PROCESSOR_ARCHITECTURE.