title: How to run Jenkins parallel cypress on different agents?
body: <p>I'm running parallel cypress in Jenkins on the same slave, and it's working,</p>
  <p>I want to change the parallel stages so each stage will run on a different slave, how can I do it?</p>
  <p>for example:</p>
  <p>run &quot;cypress tester A&quot; on slave-1.</p>
  <p>run &quot;cypress tester B&quot; on slave-2.</p>
  <p>run &quot;cypress tester C&quot; on slave-3.</p>
  <p>this is my current Jenkinsfile:</p>
  <pre><code>pipeline {
  options {
      timeout(time: 15, unit: 'MINUTES')
  }
  agent {
      docker {
          image 'cypress/base:12.18.2'
          label 'slave-1'
      }
  }
  parameters {
      string(defaultValue: 'master', description: 'Branch name', name: 'branchName')
  }
  
  stages {
      stage('build') {
          steps {
              echo 'Running build...'
              sh 'npm ci'
              sh 'npm run cy:verify'
          }
      }
  
      stage('cypress parallel tests') {
          environment {
              CYPRESS_RECORD_KEY = 'MY_CYPRESS_RECORD_KEY'
              CYPRESS_trashAssetsBeforeRuns = 'false'
          }
          parallel {
              stage('cypress tester A') {
                  steps {
                      echo &quot;Running build ${env.BUILD_ID}&quot;
                      sh &quot;npm run cypress:run&quot;
                  }
              }
              stage('cypress tester B') {
                  steps {
                      echo &quot;Running build ${env.BUILD_ID}&quot;
                      sh &quot;npm run cypress:run&quot;
                  }
              }
              stage('cypress tester C') {
                  steps {
                      echo &quot;Running build ${env.BUILD_ID}&quot;
                      sh &quot;npm run cypress:run&quot;
                  }
              }
          }
  
      }
  }
  
  post {
      always {
          cleanWs(deleteDirs: true)
          echo 'Tests are finished'
      }
  }
  </code></pre>
  <p>}</p>
  <p>The <code>cypress:run</code> command is:</p>
  <pre><code>cypress run --record --parallel --config videoUploadOnPasses=false --ci-build-id $BUILD_TAG
  </code></pre>