本文主要介绍maven项目代码自动审计环境的搭建,对于我这个小白来说,这就是传说中的DevOps吧。
jenkins、sonarqube、gitlab的搭建就不多说了,直入正题吧。
安装maven
首先服务器本安装maven
maven下载地址:http://maven.apache.org/download.cgi
下载下来的是个tar包,解压并按照你的爱好重命名
我把他解压到了/usr/local目录下,重命名为 maven3
maven配置文件设置
在maven安装路径下 conf里编辑settings文件
在里面添加如下内容
<profile>
<id>sonar</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<properties>
<sonar.host.url>
http://你的sonar地址:9000
</sonar.host.url>
</properties>
</profile>
看图,位置不要放错