sonar静扫集成

1、 .drone.yml中增加静扫配置:
code-analysis:
  image: hub.xfyun.cn/xfyun/drone-sonar-java
  sources: .
  secrets: [sonar_host, sonar_token]


2、访问https://drone.xfyun.cn/  设置secrets

增加SONAR_HOST和SONAR_TOKEN,设置如下

SONAR_HOST:https://sonar.xfyun.cn/

SONAR_TOKEN:45feccda1e9bd0ced9da797b1254169c16938c9e

设置完成后如下所示

3、提交代码后,访问 https://sonar.xfyun.cn/

猜你喜欢

转载自www.cnblogs.com/mabiao008/p/12609882.html