sonarqube

代码质量管理平台SonarQube部署文档

随声附和 提交于 2020-02-26 05:36:43
一、系统软件说明 centos-7.6 mysql-5.7.25 jdk-1.8.0_152 apache-maven-3.6.0 sonarqube-7.5 二、jdk、mysql安装略过 校时、selinux、iptables、时区、swap、openfile_limit、jdk、mysql找文档自行处理 创建sonar库,并授权给sonar用户 三、安装sonarqube 修改配置文件sonar.properties sonar.jdbc.url=jdbc:mysql://192.168.8.88:3306/sonar?useUnicode=true&characterEncoding=utf8&rewriteBatchedStatements=true&useConfigs=maxPerformance&useSSL=false sonar.jdbc.username=sonar #mysql用户名 sonar.jdbc.password=sonar #mysql密码 sonar.web.javaOpts=-Xmx512m -Xms128m -XX:+HeapDumpOnOutOfMemoryError sonar.web.context=/sonar sonar.web.port=9000 sonar.log.level=INFO sonar.log.level.es

利用开源软件搭建JAVA工程CI&CD自动化工具链

删除回忆录丶 提交于 2020-02-26 02:15:28
JAVA传统项目交付流程的问题 开发和运维间环境有明显差异 代码缺乏统一质量度量 客户要求上线时间紧,人工测试慢,导致测试不充分,时常做线上BUG修复 打造工具链 ● 源码管理Gitlab ● 持续集成Jenkins ● 代码扫描SonarQube ● 接口测试PostMan+NewMan ● 制品管理ArtifactoryOSS版本(仅支持Maven) ● 自动部署Ansible GitLab安装 vim /etc/yum.repos.d/gitlab-ce.repo [gitlab-ce] name=gitlab-ce baseurl=http://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el6 Repo_gpgcheck=0 Enabled=1 Gpgkey=https://packages.gitlab.com/gpg.key sudo yum makecache sudo yum intall gitlab-ce sudo gitlab-ctl start # 启动所有 gitlab 组件; sudo gitlab-ctl stop # 停止所有 gitlab 组件; sudo gitlab-ctl restart # 重启所有 gitlab 组件; sudo gitlab-ctl status # 查看服务状态; sudo

Authenticate sonarScanner via basic auth

一世执手 提交于 2020-02-12 05:03:09
问题 I'm frustrated with this problem, Our sonarqube server is behind http basic authentication and local runner fails with 401 error. Is it somehow possible to provide credentials to it? AOfficial docs shows how to provide sonarqube's internal user... http://www.it1me.com/it-answers?id=35790175&s=User%20talk:Omotecho&ttl=Authenticate+sonar- runner+via+basic+auth any idea or experiences about it? 回答1: The permission "Execute Analysis" is required to execute an analysis. In order to set credential

SonarQube JavaScript disable a part of code

末鹿安然 提交于 2020-02-08 03:17:27
问题 I would like to disable a block of code(say a function) in a file for analysis by SonarQube... Any suggestions on how to do that.. I found something for java here --> Turning Sonar off for certain code 回答1: As far as I know Sonar respects // NOSONAR tag for Java projects but it looks like that is also has been implemented for JS: https://jira.sonarsource.com/browse/SONARJS-294 回答2: SonarQube provides plenty of options for ignoring issues in specific files and/or code blocks, see Narrowing the

Sonarqube Delphi plugin

家住魔仙堡 提交于 2020-02-06 04:27:29
问题 I have scoured the web looking for the Sonar Delphi plugin 0.2 (sonar-delphi-plugin-0.2-SNAPSHOT.jar). Since the shutdown of codehaus, it seems this plugin is not available anywhere else? http://snapshots.repository.codehaus.org/org/codehaus/sonar-plugins/sonar-delphi-plugin/0.2-SNAPSHOT/ There is several references to this URL, but I cannot find this plugin anywhere else. Does someone please know where I can download it, or possibly has it available to share? 回答1: The plugin was abandoned

Can sonar catch null pointer exceptions caused by JVM Dynamically

拟墨画扇 提交于 2020-02-06 04:00:10
问题 I would like to ask can sonar find null pointer exception caused by java virtual machine at run time?? if yes please tell me which sonar rule do it for us. I am very much puzzled with it as there are some rules exist in sonar findbugs profile which say sonar catch null pointer exception. One of findbugs rule Avoid Throwing Null Pointer Exception say we should avoid throwing null pointer exception. please clarify me on that can sonar catch null pointer exception or not threw by JVM?? OR it can

windows环境下安装sonarQube

邮差的信 提交于 2020-02-03 05:35:14
因公司业务需求,需要搭建一套完善的CI/CD流程,为了保证代码质量,因此选用sonarQube作为我们的质量管理工具,后续会带来整套的CI/CD部署流程,首先介绍如何在本地开发环境搭建一套sonarQube。 1、官网下载 sonarQube ,我下载的是当前的最新版本V8.1 2、下载完成之后解压到自己想要的目录,比如D:\sonarQube 3、进入文件根目录下,修改配置文件 配置Java环境。编辑conf/wrapper.conf文件,配置jdk路径,点此查看 jdk安装与配置 wrapper.java.command=C:\Program Files\Java\jdk-13.0.2\bin\java 配置数据库。考虑到性能问题,SonarQube在V7.9版本之后放弃了对mysql数据库的支持,如果需要配置mysql请下载V7.9之前的版本,编辑conf/sonar.properties文件,我安装的是PostgreSQL, 下载地址 。 sonar.jdbc.username=sonar sonar.jdbc.password=123456 sonar.jdbc.url=jdbc:postgresql://localhost/sonar 4、进入bin\windows-x86-64目录下,双击StartSonar以启动服务 5、访问localhost:9000

The SonarQube MSBuild integration failed - SonarQube 7 with Scanner 4.0.2.892 and VS2017

天大地大妈咪最大 提交于 2020-02-02 14:08:46
问题 I'm using SonarQube 7.0 and SonarQube Scanner for MSBuild 4.0.2.892 and attempting to follow these instructions to scan my .NET application on Windows (ASP.NET Core). The three commands below are part of the instructions: C:\SonarQube\Scanner\SonarQube.Scanner.MSBuild.exe begin /k:"org.sonarqube:sonarqube-scanner-msbuild" /n:"TradingPlatform" /v:"1.0" "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\15.0\Bin\MSBuild.exe" /t:Rebuild C:\SonarQube\Scanner\SonarQube.Scanner

How to migrate SonarQube 6.7 from MySQL to postgresql

六月ゝ 毕业季﹏ 提交于 2020-02-02 13:31:19
问题 We need to migrate SonarQube from MySQL to posgresql. To achieve this, I would export from MySQL and import to postgresql. This I can handle, there are more than enough manuals for this and also I'm OK with database magic ;) However, my question is: would that work for SonarQube in general? Does SonarQube use some database-specific magic that would eliminate the ability to migrate? Steffen 回答1: Good news : there is no specific database magic used in SonarQube. However, note that some column

How to migrate SonarQube 6.7 from MySQL to postgresql

丶灬走出姿态 提交于 2020-02-02 13:31:11
问题 We need to migrate SonarQube from MySQL to posgresql. To achieve this, I would export from MySQL and import to postgresql. This I can handle, there are more than enough manuals for this and also I'm OK with database magic ;) However, my question is: would that work for SonarQube in general? Does SonarQube use some database-specific magic that would eliminate the ability to migrate? Steffen 回答1: Good news : there is no specific database magic used in SonarQube. However, note that some column