Thanks Chris, For the moment I was thinking of running the test on the Jenkins master, having allocated a node (for webdriver use) to pass as an argument on the maven line. So far I'm not seeing a way to allocate a node explicitly like this - it just seems to allocate nodes that it uses to launch on directly. (I can deal with not having proper hostnames by mapping symbolic ones to hard coded values.)
More detail: I could have a webdriver hub, and add/subtract nodes from it, so that the mvn cmd -Dremote=hub could be hard-coded, eliminating the need for parameter use in the cmd, but that still leaves me with the need for a hook to allocate the node without having Jenkins launch a job on it. So far, it seems like I need to write my own resource allocator, and somehow wrap it all in a shell script that Jenkins is just used to trigger: NODE = allocate_somehow() mvn -Dremote=$NODE ... test Bill On Jun 26, 2:30 am, cjo <cjo.john...@gmail.com> wrote: > Bill, > > There is the NODE_NAME environment variable which gives you the name of the > node the job is running on, however this just gives you the name of the > node as defined in Jenkins, this may or may not match to your machine > hostname especially if you run multiple slaves on the same machine. > > If you want the proper hostname of the machine the best way is to run a > shell/windows script to get it and write it to a properties file, and then > add this to the environment via the envinject plugin buildstep. > > If your intention is to call a slave from a different job on a different > machine, then there might be better ways of doing this. Such as making it a > shared resource used by all slaves and using another plugin to control > access to it. > > Chris > > > > > > > > On Monday, June 25, 2012 11:47:11 PM UTC+1, BillR wrote: > > > I want to allocate a slave and have its URL appear as a parameter, > > e.g. if it were a script, > > > WEBDRIVER_NODE = jenkins.getSlave ubuntu > > > so that in my job's mvn cmd: > > > ... -Dremote=$WEBDRIVER_NODE test > > > or possibly > > > ... -Dremote=http://${WEBDRIVER_NODE}:4444/wd/hub test > > > It seems this must be possible, but I'm not seeing it in the O'Reilly > > Jenkins book. > > > Thanks, > > Bill