Sonar installation and deployment and integration of jenkins

  1. Download the sonar installation package (6.7)

  2. Unzip

  3. Configuration such as configuration database

   sonarqube-6.7.7/conf

    image.png

4.useradd sonar  passwd sonar

The user who has sonar started it or it won’t start

5. Browse 9000 after startup

6. Sonarscanner installation

Configured on the server where jenkins is located 
[root@iZbp1dcz9uks37fwp76tlzZ conf]# pwd 
/hmm/opt/sonarscanner/sonar-scanner-2.6.1/conf 
[root@iZbp1dcz9uks37fwp76tlzZ conf]# ll 
total 8 
-rw-r--r-- 1 root root 307 Feb 27 16:27 sonar-scanner.properties 




sonar.jdbc.username=root 
sonar.jdbc.password=123456 
## Same as the server where sonar is located 
sonar.jdbc.url=jdbc:mysql://xx.xx.xx .xx:3306/sonar?useUnicode=true&characterEncoding=utf8&rewriteBatchedStatements=true& 
useConfigs=maxPerformance 
sonar.sourceEncoding=UTF-8 
#sonar.login=admin 
#sonar.password=123456 
sonar.scm.disabled=true

image.png

jenkins configure sonar plugin
image.png


image.png

sonar.projectKey=Project

sonar.projectName=Project

sonar.projectVersion=v1.0.0

sonar.sources=./

sonar.language=java

sonar.sourceEncoding=UTF-8

sonar.java.binaries=./

image.png









image.png

Guess you like

Origin blog.51cto.com/wsxxsl/2643207