• sonar runner的配置


    #Configure here general information about the environment, such as SonarQube DB details for example
    #No information about specific project should appear here
    
    #----- Default SonarQube server
    sonar.host.url=http://10.17.10.34:9000/
    
    #----- PostgreSQL
    #sonar.jdbc.url=jdbc:postgresql://localhost/sonar
    
    #----- MySQL
    sonar.jdbc.url=jdbc:mysql://10.117.150.34:33306/sonardb?useUnicode=true&characterEncoding=utf8
    
    #----- Oracle
    #sonar.jdbc.url=jdbc:oracle:thin:@localhost/XE
    
    #----- Microsoft SQLServer
    #sonar.jdbc.url=jdbc:jtds:sqlserver://localhost/sonar;SelectMethod=Cursor
    
    #----- Global database settings
    sonar.jdbc.username=sonarqube
    sonar.jdbc.password=Sonarqube
    
    #----- Default source code encoding
    sonar.sourceEncoding=UTF-8
    
    #----- Security (when 'sonar.forceAuthentication' is set to 'true')
    sonar.login=admin
    sonar.password=admin

    把sonar-runner添加到path环境变量:

    # .bash_profile
    
    # Get the aliases and functions
    if [ -f ~/.bashrc ]; then
            . ~/.bashrc
    fi
    
    # User specific environment and startup programs
    
    PATH=$PATH:$HOME/bin
    export PATH=$PATH:/usr/local/go/bin
    export PATH=$PATH:/usr/local/sonar-runner-2.4/bin
    export GOPATH=/root/go
    export PATH

    运行sonar-runner可能会报错:

    unable to execute sonar 

    Failed to upload report - 500: An error has occurred. Please contact your administrator

    大多是因为MySQL需要设置数据库允许接收的最大包,

    mysql客户端命令行执行

    set global max_allowed_packet =100*1024*1024;

    show VARIABLES like ‘%max_allowed_packet%‘; 查看 max_allowed_packet收更新成功

    然后重启sonar服务器

  • 相关阅读:
    (C#)中断程序流程,处理事件(委托,事件,Lambda表达式)2/3
    (C#) 字符串替换
    (C#基础) 方法的参数修饰符
    (C#基础) 数据类型
    (C#)中断程序流程,处理事件(委托,事件,Lambda表达式)1/3
    (PowerShell) 文件操作
    图像处理基础
    (C#)中断程序流程,处理事件(委托,事件,Lambda表达式)3/3
    迅速理解 XML
    VI命令使用(查找替换)
  • 原文地址:https://www.cnblogs.com/hankuikui/p/10302367.html
Copyright © 2020-2023  润新知