Issue Type: Bug Bug
Assignee: domi
Components: nodelabelparameter
Created: 01/Oct/12 4:33 PM
Description:

Summary: When selecting multiple nodes for parallel execution, the values selected at build time cannot be properly retrieved from the environment variable.
Steps to reproduce:
1. Create a parameterized build that contains a Node parameter named HOSTS. 2. Select "Allow multi node selection for concurrent builds"
3. Checked the box further down to allow executing concurrent builds.
4. Create a system groovy script to print the values of the nodes selected. Here's the script:

import hudson.model.*
import hudson.util.*
def build = Thread.currentThread().executable
def resolver = build.buildVariableResolver
def chosenHosts = resolver.resolve("HOSTS")
println "HOSTS from System Groovy Script= " + chosenHosts

When I build I select 2 nodes from my list of available nodes( node1 and node2). It builds and executes on both nodes.
However the value of chosenHosts in the job that ran on node1 prints a value of node1
The job that executed on node2 prints a value of null.
What I expected was that the value of chosenHosts would be "node1, node2".

Note: This is in a system groovy script, so this build step is executing on the master.

Environment: Linux Master and Slaves
Project: Jenkins
Labels: plugin
Priority: Major Major
Reporter: Damon G
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to