title: Set Jenkins label to value of build parameter for truly dynamic node and label based builds
body: <p>Is it possible to trigger Jenkins builds on nodes with an unknown label value based on a build's parameter?</p>
  
  <p>I've got a job for building that allows our devs to do just about any kind of build they want, including specified hardware to build against. The problem is that this list of HW is always changing, and I'm trying to stamp out tech debt. I would like it to be where the only necessity is a hardware-specific node having a label the devs know about, and them using a string parameter to match that node label to build against that hardware. They may have labels like, Gen1, Gen2, ProtoXYZ, who knows, you know? It evolves, constantly.</p>
  
  <p>I've seen a few similar questions, but for <a href="https://stackoverflow.com/questions/17121417/jenkins-parameterized-builds-and-the-ability-to-select-the-required-subprojects">this one</a>, there isn't a solution, and for <a href="https://stackoverflow.com/questions/30960587/configuring-jenkins-to-programmatically-determine-slave-at-build-time-from-build">this one</a>, I'm not actually sure what's going on here. I've yet to touch Groovy, and I'm trying to do as much as I can with plugins and existing Jenkins functionality.</p>
  
  <p>That doesn't mean I won't do Groovy scripts -- it's just more that I'd like to not obfuscate the process with custom scripts.</p>
  
  <h3>Edit:</h3>
  
  <p>I'm still testing it, but it looks like this one-liner Groovy script with the plugin, "Groovy Label Assignment" seems to work, but I will check back within the hour: </p>
  
  <pre><code>binding.getVariables().get("HARDWARE");
  </code></pre>
  
  <p>Where <code>HARDWARE</code> is a parameter that is set by a job parameter. The one thing I'm left to check is whether I can mix and match known and unknown labels with this functionality, e.g., a small drop-down box with known choices, but one choice essentially being "Other, please enter".</p>
  
  <p>Edit: I've been so frazzled that I googled my own previously answered question, answered by myself no less xD I've changed the title to match something more search-engine friendly. Original title was,</p>
  
  <blockquote>
    <p>Is it possible to trigger Jenkins builds on nodes with an unknown
    label value based on a build parameter?</p>
  </blockquote>