In Jenkins Freestyle JOB we have execute SonarQube Scanner section, In that we have option to include the sonar-project analysis properties, Similarly is there any way available to define/declare the sonar-project.properties in scripted pipeline itself? As I want to maintain the below properties values in my CI-System itself.
sonar.projectName=
sonar.projectKey=
sonar.projectVersion=
sonar.projectDescription=
sonar.projectBaseDir=
sonar.sources=
You can create a shell/batch script according to your OS and while running sonar-scanner command just pass the arguments as shown below:-
sonar-scanner -Dsonar.projectName=Project-Name -Dsonar.projectKey=Project-key -Dsonar.projectVersion=PV -Dsonar.projectDescription=PD -Dsonar.projectBaseDir=PBD -Dsonar.sources=sources
For more details please click sonarlink
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.