Centos7+svn+jenkins+maven+SonarQube+docker Continuous Integrated Installation (I)
Centos7+svn+jenkins+maven+SonarQube+docker Continuous Integrated Installation (II)
1: jenkins configures jdk, maven
System Management --"Global Tool Configuration --> MAVEN
Edit maven's configuration file: you can adjust the format of the display by yourselves
vim /usr/local/maven3/conf/settings.xml
<?xml version="1.0" encoding="UTF-8"?>
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd">
<servers>
<server>
<id>central</id>
<username>admin</username>
<server>
<id>thirdparty</id>
<username>admin</username>
<password>admin123</password>
</server>
<server>
<id>central</id>
<username>admin</username>
<password>admin123</password>
</server>
<server>
<id>releases</id>
<username>admin</username>
<password>admin123</password>
</server>
<server>
<id>snapshots</id>
<username>admin</username>
<password>admin123</password>
</server>
<server>
<id>pro</id>
<username>admin</username>
<password>admin123</password>
</server>
<server>
<id>pre</id>
<username>admin</username>
<password>admin123</password>
</server>
<server>
<id>test01</id>
<username>admin</username>
<server>
<id>releases</id>
<username>admin</username>
<password>admin123</password>
</server>
<server>
<id>snapshots</id>
<username>admin</username>
<password>admin123</password>
</server>
<server>
<id>pro</id>
<username>admin</username>
<password>admin123</password>
</server>
<server>
<id>pre</id>
<username>admin</username>
<password>admin123</password>
</server>
<server>
<id>test01</id>
<username>admin</username>
<password>admin123</password>
</server>
</servers>
<mirrors>
<mirror>
<id>mirror</id>
<mirrorOf>*</mirrorOf>
<url>http://192.168.150.150:8081/nexus/content/groups/public/</url>
</mirror>
</mirrors>
<profiles>
<mirrors>
<mirror>
<id>mirror</id>
<mirrorOf>*</mirrorOf>
<url>http://192.168.150.150:8081/nexus/content/groups/public/</url>
</mirror>
</mirrors>
<profiles>
<profile>
<id>pro</id>
<repositories>
<repository>
<id>pro</id>
<name>pro</name>
<url>http://192.168.150.150:8081/content/repositories/pro</url>
</repository>
<repository>
<id>3rdparties</id>
<name>3rdparties</name>
<url>http://192.168.150.150:8081/content/repositories/3rdparties</url>
</repository>
</repositories>
</profile>
<profile>
<id>pre</id>
<repositories>
<repository>
<id>pre</id>
<name>pre</name>
<url>http://192.168.150.150:8081/nexus/content/repositories/pre</url>
</repository>
<repository>
<id>3rdparties</id>
<name>3rdparties</name>
<url>http://192.168.150.150:8081/content/repositories/3rdparties</url>
</repository>
</repositories>
</profile>
<profile>
<id>test01</id>
<repositories>
<repository>
<id>test01</id>
<name>test01</name>
<url>http://192.168.150.150:8081/content/repositories/test01/</url>
</repository>
<repository>
<id>3rdparties</id>
<name>3rdparties</name> <url>http://192.168.150.150:8081/content/repositories/3rdparties</url>
</repository>
</repositories>
</profile>
</profiles>
<activeProfiles>
<activeProfile>alwaysActiveProfile</activeProfile>
<activeProfile>anotherAlwaysActiveProfile</activeProfile>
</activeProfiles>
</settings>
System Management --"Global Tool Configuration --> JDK
2: Configure sonarqube
System Management - Global Tool Configuration
System Management - System Settings
If set to 5.3 or higher selection, you must use sonarQube account token to connect, which is safer.
Server authentication token item needs to be generated on sonar server side
Access sonar server side
Menu Configuration Permissions Users TOKENS Generate generates token, adds the generated token to this, completes the addition
3: Configure nexus 2.4
Firstly, the address of the central warehouse should be changed to Aliyun address to improve the speed of package pulling.
Login system, we built three private libraries, test01, pre, pro, corresponding to our three different environments
Add all libraries to the public repository address so that they can be downloaded to dependencies normally