From 876c96d0b5227bebe4c1f6d160b1bc7bc6d64e97 Mon Sep 17 00:00:00 2001 From: nileshgulia1 Date: Wed, 3 Nov 2021 15:15:56 +0530 Subject: [PATCH] skip cypress --- Jenkinsfile | 48 ++++++++++++++++++++++++------------------------ 1 file changed, 24 insertions(+), 24 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index d0832af..f240010 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -121,30 +121,30 @@ pipeline { // } // } - stage('Report to SonarQube') { - // Exclude Pull-Requests - when { - allOf { - environment name: 'CHANGE_ID', value: '' - } - } - steps { - node(label: 'swarm') { - script{ - checkout scm - unstash "xunit-reports" - unstash "cypress-coverage" - def scannerHome = tool 'SonarQubeScanner'; - def nodeJS = tool 'NodeJS11'; - withSonarQubeEnv('Sonarqube') { - sh '''sed -i "s#/opt/frontend/my-volto-project/src/addons/${GIT_NAME}/##g" xunit-reports/coverage/lcov.info''' - sh "export PATH=$PATH:${scannerHome}/bin:${nodeJS}/bin; sonar-scanner -Dsonar.javascript.lcov.reportPaths=./xunit-reports/coverage/lcov.info,./cypress-coverage/coverage/lcov.info -Dsonar.sources=./src -Dsonar.projectKey=$GIT_NAME-$BRANCH_NAME -Dsonar.projectVersion=$BRANCH_NAME-$BUILD_NUMBER" - sh '''try=2; while [ \$try -gt 0 ]; do curl -s -XPOST -u "${SONAR_AUTH_TOKEN}:" "${SONAR_HOST_URL}api/project_tags/set?project=${GIT_NAME}-${BRANCH_NAME}&tags=${SONARQUBE_TAGS},${BRANCH_NAME}" > set_tags_result; if [ \$(grep -ic error set_tags_result ) -eq 0 ]; then try=0; else cat set_tags_result; echo "... Will retry"; sleep 60; try=\$(( \$try - 1 )); fi; done''' - } - } - } - } - } + // stage('Report to SonarQube') { + // // Exclude Pull-Requests + // when { + // allOf { + // environment name: 'CHANGE_ID', value: '' + // } + // } + // steps { + // node(label: 'swarm') { + // script{ + // checkout scm + // unstash "xunit-reports" + // unstash "cypress-coverage" + // def scannerHome = tool 'SonarQubeScanner'; + // def nodeJS = tool 'NodeJS11'; + // withSonarQubeEnv('Sonarqube') { + // sh '''sed -i "s#/opt/frontend/my-volto-project/src/addons/${GIT_NAME}/##g" xunit-reports/coverage/lcov.info''' + // sh "export PATH=$PATH:${scannerHome}/bin:${nodeJS}/bin; sonar-scanner -Dsonar.javascript.lcov.reportPaths=./xunit-reports/coverage/lcov.info,./cypress-coverage/coverage/lcov.info -Dsonar.sources=./src -Dsonar.projectKey=$GIT_NAME-$BRANCH_NAME -Dsonar.projectVersion=$BRANCH_NAME-$BUILD_NUMBER" + // sh '''try=2; while [ \$try -gt 0 ]; do curl -s -XPOST -u "${SONAR_AUTH_TOKEN}:" "${SONAR_HOST_URL}api/project_tags/set?project=${GIT_NAME}-${BRANCH_NAME}&tags=${SONARQUBE_TAGS},${BRANCH_NAME}" > set_tags_result; if [ \$(grep -ic error set_tags_result ) -eq 0 ]; then try=0; else cat set_tags_result; echo "... Will retry"; sleep 60; try=\$(( \$try - 1 )); fi; done''' + // } + // } + // } + // } + // } stage('Pull Request') { when {