title: How to use multiple labels to select a node in a Jenkins Pipeline script?
body: <p><strong>Intro:</strong></p>
  
  <p>We are currently running a Jenkins master with multiple slave nodes, each of which is currently tagged with a single label (e.g., <code>linux</code>, <code>windows</code>, ...)</p>
  
  <p>In our scripted-pipeline scripts (which are defined in a <a href="https://jenkins.io/doc/book/pipeline/shared-libraries/" rel="noreferrer">shared library</a>), we currently use snippets like the following:</p>
  
  <pre><code>node ("linux") {
      // do something on a linux node
  }
  </code></pre>
  
  <p>or </p>
  
  <pre><code>node ("windows") {
      // do something on a windows node
  }
  </code></pre>
  
  <p>Yet, as our testing environment grows, we now have multiple different Linux environments, some of which have or do not have certain capabilities (e.g., some may be able to run service <code>X</code> and some may not).</p>
  
  <p>I would like to label my slaves now with multiple lables, indicating their capabilities, for example:</p>
  
  <ul>
  <li>Slave 1: <code>linux</code>, <code>serviceX</code>, <code>serviceY</code></li>
  <li>Slave 2: <code>linux</code>, <code>serviceX</code>, <code>serviceZ</code></li>
  </ul>
  
  <p>If I now need a Linux slave that is able to run service <code>X</code>, I wanted to do the following (<a href="https://jenkins.io/doc/pipeline/steps/workflow-durable-task-step/#code-node-code-allocate-node" rel="noreferrer">according to this</a>):</p>
  
  <pre><code>node ("linux" &amp;&amp; "serviceX") {
      // do something on a linux node that is able to run service X
  }
  </code></pre>
  
  <p>Yet, this fails.
  Sometime, also a <code>windows</code> slave gets selected, which is not what I want to achieve. </p>
  
  <hr>
  
  <p><strong>Question:</strong> How can i define multiple labels (and-combined) based on which a node gets selected in a Jenkins scripted pipepline script?</p>