sonarqube 部署 - 持续检查代码质量 安装部署 docker rancher


https://hub.docker.com/_/sonarqube


sonarqube

sonarqube:latest

卷:

/etc/localtime:/etc/localtime:ro

/data/file:/data/file

变量:

SONARQUBE_JDBC_USERNAME = ihunter

SONARQUBE_JDBC_PASSWORD = wdqdmm@m

SONARQUBE_JDBC_URL: jdbc = mysql://mysql:3306/sonarqube?useUnicode=true&characterEncoding=utf8&useSSL=false

端口(http)

9001-9000


http://ip:9001   默认帐号密码: admin-admin


中文: Administration > Marketplace,在搜索框中输入chinese,出现一个Chinese Pack,点击右侧的install按钮。


vi  settings.xml  # 增加内容

.......

    </servers>

    <pluginGroups>

        <pluginGroup>org.sonarsource.scanner.maven</pluginGroup>

    </pluginGroups>

    <profiles>

........

    </profile>

    <profile>

            <id>sonar</id>

            <activation>

                <activeByDefault>true</activeByDefault>

            </activation>

            <properties>

                <!-- Optional URL to server. Default value is http://localhost:9000 -->

                <sonar.host.url>

                    http://105.domsn.com:9001

                </sonar.host.url>

            </properties>

    </profile>

  </profiles>

........




SonarQube 是一款用于代码质量管理的开源工具,它主要用于管理源代码的质量。 通过插件形式,可以支持众多计算机语言,比如 java, C#, go,C/C++, PL/SQL, Cobol, JavaScrip, Groovy 等。sonar可以通过PMD,CheckStyle,Findbugs等等代码规则检测工具来检测你的代码,帮助你发现代码的漏洞,Bug,异味等信息。

Sonar 不仅提供了对 IDE 的支持,可以在 Eclipse和 IntelliJ IDEA 这些工具里联机查看结果;同时 Sonar 还对大量的持续集成工具提供了接口支持,可以很方便地在持续集成中使用 Sonar。


https://www.jianshu.com/p/b357cf94e4d2


签名:这个人很懒,什么也没有留下!
最新回复 (0)
返回