简体   繁体   English

jenkins for windows 中的 Sonarqube 配置

[英]Sonarqube configuration in jenkins for windows

I am trying to integrate Sonarqube in Jenkins for windows.我正在尝试将 Sonarqube 集成到 Jenkins for windows 中。

I have installed Jenkins 2.138.2 and Sonarqube scanner plugin version 2.8.1我已经安装了 Jenkins 2.138.2 和 Sonarqube 扫描仪插件版本 2.8.1

Also installed Sonarqube-7.3 and added it to path variable.还安装了 Sonarqube-7.3 并将其添加到路径变量中。

Below is my configuration in Jenkins:以下是我在 Jenkins 中的配置:

  • Under "Global Tool Configuration", for SonarQube Scanner installations - I have selected "Install automatically" and choose "Install from Maven Central".在“全局工具配置”下,对于 SonarQube 扫描仪安装 - 我选择了“自动安装”并选择“从 Maven 中心安装”。

  • Under "Configure System", I have specified name and server url for Sonarqube servers.在“配置系统”下,我为 Sonarqube 服务器指定了名称和服务器 URL。

  • For the job, I have selected "Sonarqube analysis with Maven" under post build action step(shows this is deprecated).对于这项工作,我在构建后操作步骤下选择了“Sonarqube analysis with Maven”(显示这已被弃用)。

在此处输入图片说明

在此处输入图片说明

在此处输入图片说明

I am getting the below error.我收到以下错误。

WARN: Unable to locate 'report-task.txt' in the workspace.警告:无法在工作区中找到“report-task.txt”。 Did the SonarScanner succedeed? SonarScanner 成功了吗? SonarQube analysis completed: FAILURE Build step 'SonarQube analysis with Maven' changed build result to FAILURE Build step 'SonarQube analysis with Maven' marked build as failure SonarQube 分析完成:FAILURE Build step 'SonarQube analysis with Maven' 将构建结果更改为 FAILURE Build step 'SonarQube analysis with Maven' 将构建标记为失败

Is there anything wrong with the configuration.是不是配置有问题。

Edit: Added job configuration screenshots.编辑:添加了作业配置屏幕截图。

Downloading of sonarqube can be done form https://www.sonarqube.org/downloads/ where downloading can be done irrespective to the requirements(here, downloading of Developers Version ver 7.4 is done) a.可以从https://www.sonarqube.org/downloads/下载 sonarqube,无论要求如何都可以下载(这里,下载了 Developers Version ver 7.4) a. It will be downloaded in a zip format and will contain the sonarqube accessing file in various platforms, unzip the folder and extract all the files in your local system.它将以 zip 格式下载,并将包含各种平台上的声纳访问文件,解压缩文件夹并提取本地系统中的所有文件。

b.Download the sonarqube scanner, it is helpful cause, it is the only way to start the code analysis, it is the most required or can be said as default launcher to analyse project with SonarQube.下载 sonarqube 扫描器,它很有帮助,它是启动代码分析的唯一途径,它是最需要或可以说是使用 SonarQube 分析项目的默认启动器。

c. C。 To start sonarqube, the start/open the startsonar.bat file.要启动 sonarqube,请启动/打开 startsonar.bat 文件。

d. d. The sonarqube can be runs in default 9000 port. sonarqube 可以在默认的 9000 端口运行。

e. e. Launch sonarqube locally in the system.在系统中本地启动声纳。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM