Must-share information (formatted with Markdown):
- Version: sonarqube plugin 2.4.1
Trying to achieve: Trying to configure Sonar scan using Jenkin pipeline rather than calling from Jenkin build - what have you tried so far to achieve this : I am able to setup sonarqubescan using Jenkin build however I want to setup same thing in my Jenkin declarative pipeline . so far I have created
“sonar-project.properties” with below settings and calling the same from pipeline
sonar.projectKey="###"
sonar.projectName="##"
sonar.projectVersion=1.0
sonar.ProjectBaseDir=$WORKSPACE
sonar.sources=.
sonar.cs.opencover.reportsPaths=“opencover.xml”
command to call from pipeline:
stage('Sonarqube analysis') {
steps {
tool name: 'SonarQube', type: 'hudson.plugins.sonar.SonarRunnerInstallation'
withSonarQubeEnv('SonarQube') {
bat "sonar-project.properties.bat"
} } }
Error: Unable to recognize any of the above command like
‘sonar.projectKey’ is not recognized as an internal or external command,
much appreciate for any direction/pointers.