Thanks Chris, That is exactly what I needed. I'll use the EXECUTOR_NUMBER to solve the immediate problem. The port allocator plugin could be a more log-term solution.
Cheers Michael. On Tuesday, 23 October 2012 01:56:17 UTC+1, Christopher Orr wrote: > > Hi there, > > On 10/23/2012 01:17 AM, Michael wrote: > > I have 4 execution slots on my master node which run similar jobs. > > I'd like to have access to the number of the slot that a build is > > running on that I can use it calculate a port offset for each build > > so that there is no clash of ports. > > > > Had a quick look at the API doc http://javadoc.jenkins-ci.org but > > could not find anything. > > > > Could any one point me in the right direction? > > I'm not sure if this quite meets your needs, but the Port Allocator > Plugin is intended for these types of situations: > https://wiki.jenkins-ci.org/display/JENKINS/Port+Allocator+Plugin > > In any case, you should be able to use the environment variable > "EXECUTOR_NUMBER": > > https://wiki.jenkins-ci.org/display/JENKINS/Building+a+software+project#Buildingasoftwareproject-JenkinsSetEnvironmentVariables > > > Regards, > Chris >