Jenkins集成Sonarqube

本是以Maven项目为示例进行的集成演练

Jenkins 安装插件

配置 SonarQube Scanner

image-20220720135642149

配置SonarQube servers

image-20220720135838080

这里需要添加 token,我们可以去SonarQube 页面生成

image-20220720135933803

Maven 配置

修改 setting.xml

添加maven 插件

部署

部署 的方式大家可以选择自己喜欢的方式

主要是执行如下命令

这样会将artifactId 标签作为项目名称,展现在 sonarqube上

image-20220720140858393

Last updated

Was this helpful?