Node Label Parementer Plugin - Value of Node param variable doesnt contain all values when multiselecting nodes

This issue is archived. You can view it, but you can't modify it. Learn more

XMLWordPrintable

      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.

            Assignee:
            Dominik Bartholdi
            Reporter:
            Damon G
            Archiver:
            Jenkins Service Account

              Created:
              Updated:
              Resolved:
              Archived: