Skip to content

Commit

Permalink
Update Jenkinsfile
Browse files Browse the repository at this point in the history
  • Loading branch information
anton16 authored Nov 10, 2021
1 parent 228801f commit eeb167f
Showing 1 changed file with 27 additions and 29 deletions.
56 changes: 27 additions & 29 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -88,35 +88,33 @@ pipeline {
//# }


//#stage('Report to SonarQube') {
//# steps {
//# node(label: 'docker') {
//# script{
//# // get the code
//# checkout scm
//# // get the result of the tests that were run in a previous Jenkins test
//# dir("xunit-reports") {
//# unstash "xunit-reports"
//# }
//# // get the result of the cobertura test
//# unstash "coverage.xml"
//# // get the sonar-scanner binary location
//# def scannerHome = tool 'SonarQubeScanner';
//# // get the nodejs binary location
//# def nodeJS = tool 'NodeJS11';
//# // run with the SonarQube configuration of API and token
//# withSonarQubeEnv('Sonarqube') {
//# // make sure you have the same path to the code as in the coverage report
//# sh '''sed -i "s|/plone/instance/src/$GIT_NAME|$(pwd)|g" coverage.xml'''
//# // run sonar scanner
//# sh "export PATH=$PATH:${scannerHome}/bin:${nodeJS}/bin; sonar-scanner -Dsonar.python.xunit.skipDetails=true -Dsonar.python.xunit.reportPath=xunit-reports/*.xml -Dsonar.python.coverage.reportPath=coverage.xml -Dsonar.sources=./eea -Dsonar.projectKey=$GIT_NAME-$BRANCH_NAME -Dsonar.projectVersion=$BRANCH_NAME-$BUILD_NUMBER"
//# }
//# }
//# }
//# }
//#}


//stage('Report to SonarQube') {
// steps {
// node(label: 'docker') {
// script{
// // get the code
// checkout scm
// // get the result of the tests that were run in a previous Jenkins test
// dir("xunit-reports") {
// unstash "xunit-reports"
// }
// // get the result of the cobertura test
// unstash "coverage.xml"
// // get the sonar-scanner binary location
// def scannerHome = tool 'SonarQubeScanner';
// // get the nodejs binary location
// def nodeJS = tool 'NodeJS11';
// // run with the SonarQube configuration of API and token
// withSonarQubeEnv('Sonarqube') {
// // make sure you have the same path to the code as in the coverage report
// sh '''sed -i "s|/plone/instance/src/$GIT_NAME|$(pwd)|g" coverage.xml'''
// // run sonar scanner
// sh "export PATH=$PATH:${scannerHome}/bin:${nodeJS}/bin; sonar-scanner -Dsonar.python.xunit.skipDetails=true -Dsonar.python.xunit.reportPath=xunit-reports/*.xml -Dsonar.python.coverage.reportPath=coverage.xml -Dsonar.sources=./eea -Dsonar.projectKey=$GIT_NAME-$BRANCH_NAME -Dsonar.projectVersion=$BRANCH_NAME-$BUILD_NUMBER"
// }
// }
// }
// }
//}

stage('Pull Request') {
when {
Expand Down

0 comments on commit eeb167f

Please sign in to comment.