Skip to content

Instantly share code, notes, and snippets.

@slutske22
Last active March 25, 2022 17:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save slutske22/de32400616ba9b0c583ad5d0eb15ddc1 to your computer and use it in GitHub Desktop.
Save slutske22/de32400616ba9b0c583ad5d0eb15ddc1 to your computer and use it in GitHub Desktop.
sorry-cypress-jenkinsfile
stage ('Cypress'){
parallel {
stage('Cypress 1') {
agent {
node {
label 'agent-1'
}
}
steps {
sh 'npm install --silent'
sh 'npm start & npx wait-on http://localhost:3000'
sh "CYPRESS_API_URL=\"http://Sorry-Cypress-Instance-IP:1234/\" npx cy2 run --record --key XXX --parallel --ci-build-id env.BUILD_ID"
}
}
stage('Cypress 2') {
agent {
node {
label 'agent-2'
}
}
steps {
sh 'npm install --silent'
sh 'npm start & npx wait-on http://localhost:3000'
sh "CYPRESS_API_URL=\"http://Sorry-Cypress-Instance-IP:1234/\" npx cy2 run --record --key XXX --parallel --ci-build-id env.BUILD_ID"
}
}
stage('Cypress 3') {
agent {
node {
label 'agent-3'
}
}
steps {
sh 'npm install --silent'
sh 'npm start & npx wait-on http://localhost:3000'
sh "CYPRESS_API_URL=\"http://Sorry-Cypress-Instance-IP:1234/\" npx cy2 run --record --key XXX --parallel --ci-build-id env.BUILD_ID"
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment