From 4e75cee9ce9db2cd119fe0e5008fcb5dd48e61b2 Mon Sep 17 00:00:00 2001 From: helenanull Date: Fri, 2 Apr 2021 17:51:02 +0300 Subject: [PATCH] pipeline and dashboard setup --- Jenkinsfile | 24 +++++++++++++++++++----- package.json | 3 ++- 2 files changed, 21 insertions(+), 6 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 93ac974..f74e596 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -2,15 +2,29 @@ pipeline { agent any stages { - stage('Dependencies') { + stage('dependencies') { steps { sh 'npm i' } } - stage('Test') { - steps { - echo 'Testing..' - sh 'npm run cy:run:web' + stage('cypress parallel tests') { + environment { + CYPRESS_RECORD_KEY = credentials('cypress-example-record-key') + CYPRESS_trashAssetsBeforeRuns = 'false' + } + + parallel { + stage('machine 1') { + steps { + sh "npm run cy:ci" + } + } + + stage('machine 2') { + steps { + sh "npm run cy:ci" + } + } } } } diff --git a/package.json b/package.json index a0cc1ab..e3793b6 100644 --- a/package.json +++ b/package.json @@ -6,7 +6,8 @@ "cy:open:mob": "cypress open --env device=mob", "cy:open:web": "cypress open --env device=web", "cy:run:mob": "cypress run --env device=mob", - "cy:run:web": "cypress run --env device=web" + "cy:run:web": "cypress run --env device=web", + "cy:ci": "cypress run --env device=web --record --parallel --config projectId=urshkd" }, "devDependencies": { "cypress": "^6.8.0",