You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
Mario Lubenka d0fc9a1d7f Adds setting for branch analysis 2 years ago
vendor/github.com/codegangsta/cli add tested code 3 years ago
.gitignore add tested code 3 years ago
DOCS.md Adds setting for branch analysis 2 years ago
Dockerfile Improved Dockerfile 3 years ago
LICENSE Initial commit 3 years ago
README.md update yaml format 3 years ago
drone-sonar Adds setting for branch analysis 2 years ago
logo.svg add tested code 3 years ago
main.go Adds setting for branch analysis 2 years ago
plugin.go Adds setting for branch analysis 2 years ago

README.md

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