yusiwen / drone-sonar-plugin

The plugin of Drone CI to integrate with SonarQube (previously called Sonar), which is an open source code quality management platform.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

drone-sonar-plugin

Forked from aosapps/drone-sonar-plugin, and upgrade sonar-scanner-cli to 5.0.1 to support SonarQube server 10.x

The plugin of Drone CI to integrate with SonarQube (previously called Sonar), which is an open source code quality management platform.

Detail tutorials: DOCS.md.

Build process

build go binary file: GOOS=linux GOARCH=amd64 CGO_ENABLED=0 go build -o drone-sonar

build docker image docker build -t aosapps/drone-sonar-plugin .

Testing the docker image:

docker run --rm \
  -e DRONE_REPO=test \
  -e PLUGIN_SOURCES=. \
  -e SONAR_HOST=http://localhost:9000 \
  -e SONAR_TOKEN=60878847cea1a31d817f0deee3daa7868c431433 \
  yusiwen/drone-sonar-plugin

Pipeline example

steps
- name: code-analysis
  image: yusiwen/drone-sonar-plugin
  settings:
      sonar_host:
        from_secret: sonar_host
      sonar_token:
        from_secret: sonar_token

About

The plugin of Drone CI to integrate with SonarQube (previously called Sonar), which is an open source code quality management platform.

License:MIT License


Languages

Language:Go 82.6%Language:Dockerfile 17.4%