Exclude tests from sonar
This commit is contained in:
2
Jenkinsfile
vendored
2
Jenkinsfile
vendored
@@ -70,7 +70,7 @@ pipeline {
|
|||||||
def scannerHome = tool name: 'SonarQubeScanner', type: 'hudson.plugins.sonar.SonarRunnerInstallation';
|
def scannerHome = tool name: 'SonarQubeScanner', type: 'hudson.plugins.sonar.SonarRunnerInstallation';
|
||||||
withSonarQubeEnv('sonar') {
|
withSonarQubeEnv('sonar') {
|
||||||
GIT_COMMIT_HASH = sh (script: "git log -n 1 --pretty=format:'%H'", returnStdout: true)
|
GIT_COMMIT_HASH = sh (script: "git log -n 1 --pretty=format:'%H'", returnStdout: true)
|
||||||
sh "${scannerHome}/bin/sonar-scanner -Dsonar.projectKey=cryptbase -Dsonar.projectVersion=${GIT_COMMIT_HASH} -Dsonar.python.pylint.reportPaths=prospector.txt -Dsonar.junit.reportsPath=junit-py39.xml -Dsonar.python.coverage.reportPaths=cov-py39.xml -Dsonar.coverage.dtdVerification=false"
|
sh "${scannerHome}/bin/sonar-scanner -Dsonar.projectKey=cryptbase -Dsonar.projectVersion=${GIT_COMMIT_HASH} -Dsonar.python.pylint.reportPaths=prospector.txt -Dsonar.junit.reportsPath=junit-py39.xml -Dsonar.python.coverage.reportPaths=cov-py39.xml -Dsonar.coverage.dtdVerification=false -Dsonar.exclusions=tests/"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user