Go to file
Rogan 3beb2a20f8
Merge pull request #12 from aosapps/roganw-patch-1
update sonar-scanner to 4.2.0.1873
2019-11-25 02:01:00 +08:00
vendor/github.com/codegangsta/cli add tested code 2018-08-29 00:39:09 +08:00
.gitignore add tested code 2018-08-29 00:39:09 +08:00
Dockerfile update sonar-scanner to 4.2.0.1873 2019-11-25 02:00:06 +08:00
DOCS.md Adds setting for branch analysis 2019-11-20 22:36:35 +01:00
drone-sonar Adds setting for branch analysis 2019-11-20 22:36:35 +01:00
LICENSE Initial commit 2018-08-29 00:31:39 +08:00
logo.svg add tested code 2018-08-29 00:39:09 +08:00
main.go Adds setting for branch analysis 2019-11-20 22:36:35 +01:00
plugin.go Adds setting for branch analysis 2019-11-20 22:36:35 +01:00
README.md update yaml format 2019-02-17 11:10:46 +08:00

drone-sonar-plugin

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 \
  aosapps/drone-sonar-plugin

Pipeline example

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