https://cypress.io logo
How to perform parallel run in multiple nodes/mach...
# i-need-help
m
Hi! I hope someone can give an idea how we can perform parallel execution in multiple node/machine in Jenkins pipeline. I followed the instruction here https://github.com/cypress-io/cypress-example-kitchensink/blob/master/Jenkinsfile for setting up Jenkins parallel execution. But it seems that it only execute in one machine. Whenever I check the logs I see that every stages are being run in parallel but only in one machine My JenkinsPipeline is declarative and here is the setup:
Copy code
pipeline {
    agent {
        docker {
            label 'default'
            image 'cypress/base:14.16.0'
        
        }
    }
    stages {
        stage('Install Dependencies') { 
            steps {
                echo "Running build ${env.BUILD_ID} on ${env.JENKINS_URL}"
                sh 'npm ci'
                sh 'npm run cy:verify'
            }
          }
        stage('CBS UI Test') { 
            environment {
                CYPRESS_RECORD_KEY = credentials('cypress-record-key')
                CYPRESS_trashAssetsBeforeRuns = 'false'
            }
            parallel {
                stage('Tester A') {
                    steps {
                        echo "Running build ${env.BUILD_ID} on Tester A"
                        sh "NO_COLOR=1 xvfb-run -a npx cypress-cloud run --parallel --record --key ${env.CYPRESS_RECORD_KEY}"
                    }
                }
                stage('Tester B') {
                    steps {
                        echo "Running build ${env.BUILD_ID} on Tester B"
                        sh "NO_COLOR=1 xvfb-run -a npx cypress-cloud run --parallel --record --key ${env.CYPRESS_RECORD_KEY}"
                    }
                }
                stage('Tester C') {
                    steps {
                        echo "Running build ${env.BUILD_ID} on Tester C"
                        sh "NO_COLOR=1 xvfb-run -a npx cypress-cloud run --parallel --record --key ${env.CYPRESS_RECORD_KEY}"
                    }}}}}}
m
Hi @millions-flower-39293 Did you manage to solve this issue?
That's good to hear! Was there an error in the example file https://github.com/cypress-io/cypress-example-kitchensink/blob/master/Jenkinsfile you referred to? If yes, then we should try to get it updated.
2 Views