title: Run Jenkins parallel stages across different nodes using declarative syntax
body: <p>Managed to successfully run integration tests in parallel on the same node and I now I would like to distribute them across different nodes. In the example below I want stages <code>IT 1</code> and <code>IT 2</code> to run on different nodes leaving <code>IT 3</code> to run on the original node. Tried several combinations by using <code>node</code> as a parent of <code>stage('IT 1')</code> and <code>node</code> as a child but I get syntax errors for both. What is the proper syntax to achieve this?</p>
  
  <pre><code>pipeline {
  
    agent { label '!master' }
  
    stages {
      stage('Integration Tests') {
        parallel {
          stage('IT 1 (slow)') {
            steps {
              sh 'run-it-1.sh'
            }
          }
          stage('IT 2 (slow)') {
            steps {
              sh 'run-it-2.sh'
            }
          }
          stage('IT 3 (quick)') {
            steps {
              sh 'run-it-3.sh'
            }
          }
        }
      }
    }
  }
  </code></pre>
  
  <p>Edit: Using <code>label</code> instead of <code>node</code> works for declarative pipelines. Example below:</p>
  
  <pre><code>stage('IT 1 (slow)') {
    agent { label '!master' }
    steps {
      sh 'run-it-1.sh'
    }
  }
  </code></pre>